diff options
| author | Eli Zaretskii | 2017-05-31 19:01:31 +0300 |
|---|---|---|
| committer | Eli Zaretskii | 2017-05-31 19:01:31 +0300 |
| commit | 140ddc321be96c03ef234a12c56cef97a078fc07 (patch) | |
| tree | 96ea84c5cdcc8cfb9be7036bd30e702c62a736fb /doc | |
| parent | a415c8bccb917c247792c4ce8e77b2512b3414d6 (diff) | |
| download | emacs-140ddc321be96c03ef234a12c56cef97a078fc07.tar.gz emacs-140ddc321be96c03ef234a12c56cef97a078fc07.zip | |
Support lower bound on hscrolling when only current line scrolls
* doc/emacs/display.texi (Horizontal Scrolling): Document the new
mode of auto-hscrolling only the current line.
* src/xdisp.c (init_iterator): When hscrolling only the
current line, apply the window's min_hscroll here, so that
non-current lines will be hscrolled by that minimum.
Suggested by Stephen Berman <stephen.berman@gmx.net>.
(hscroll_window_tree): Account for window's min_hscroll when
deciding whether to recompute the hscroll.
(display_line): Subtract window's min_hscroll from x_incr, as that
was already accounted for in init_iterator. (Bug#27008)
Diffstat (limited to 'doc')
| -rw-r--r-- | doc/emacs/display.texi | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/doc/emacs/display.texi b/doc/emacs/display.texi index d07913cefbe..a0d0792eacc 100644 --- a/doc/emacs/display.texi +++ b/doc/emacs/display.texi | |||
| @@ -308,7 +308,11 @@ displayed. When the text in a window is scrolled horizontally, text | |||
| 308 | lines are truncated rather than continued (@pxref{Line Truncation}). | 308 | lines are truncated rather than continued (@pxref{Line Truncation}). |
| 309 | If a window shows truncated lines, Emacs performs automatic horizontal | 309 | If a window shows truncated lines, Emacs performs automatic horizontal |
| 310 | scrolling whenever point moves off the left or right edge of the | 310 | scrolling whenever point moves off the left or right edge of the |
| 311 | screen. To disable automatic horizontal scrolling, set the variable | 311 | screen. By default, all the lines in the window are scrolled |
| 312 | horizontally together, but if you set the variable | ||
| 313 | @code{auto-hscroll-mode} to the special value of @code{current-line}, | ||
| 314 | only the line showing the cursor will be scrolled. To disable | ||
| 315 | automatic horizontal scrolling entirely, set the variable | ||
| 312 | @code{auto-hscroll-mode} to @code{nil}. Note that when the automatic | 316 | @code{auto-hscroll-mode} to @code{nil}. Note that when the automatic |
| 313 | horizontal scrolling is turned off, if point moves off the edge of the | 317 | horizontal scrolling is turned off, if point moves off the edge of the |
| 314 | screen, the cursor disappears to indicate that. (On text terminals, | 318 | screen, the cursor disappears to indicate that. (On text terminals, |
| @@ -366,7 +370,10 @@ sufficiently large argument will restore the normal display. | |||
| 366 | If you use those commands to scroll a window horizontally, that sets | 370 | If you use those commands to scroll a window horizontally, that sets |
| 367 | a lower bound for automatic horizontal scrolling. Automatic scrolling | 371 | a lower bound for automatic horizontal scrolling. Automatic scrolling |
| 368 | will continue to scroll the window, but never farther to the right | 372 | will continue to scroll the window, but never farther to the right |
| 369 | than the amount you previously set by @code{scroll-left}. | 373 | than the amount you previously set by @code{scroll-left}. When |
| 374 | @code{auto-hscroll-mode} is set to @code{current-line}, all the lines | ||
| 375 | other than the one showing the cursor will be scrolled by that minimal | ||
| 376 | amount. | ||
| 370 | 377 | ||
| 371 | @node Narrowing | 378 | @node Narrowing |
| 372 | @section Narrowing | 379 | @section Narrowing |