summaryrefslogtreecommitdiff
path: root/doc/emacs/display.texi
diff options
context:
space:
mode:
authorEli Zaretskii <eliz@gnu.org>2017-05-31 19:01:31 +0300
committerEli Zaretskii <eliz@gnu.org>2017-05-31 19:01:31 +0300
commit140ddc321be96c03ef234a12c56cef97a078fc07 (patch)
tree96ea84c5cdcc8cfb9be7036bd30e702c62a736fb /doc/emacs/display.texi
parenta415c8bccb917c247792c4ce8e77b2512b3414d6 (diff)
downloademacs-140ddc321be96c03ef234a12c56cef97a078fc07.tar.gz
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/emacs/display.texi')
-rw-r--r--doc/emacs/display.texi11
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
lines are truncated rather than continued (@pxref{Line Truncation}).
If a window shows truncated lines, Emacs performs automatic horizontal
scrolling whenever point moves off the left or right edge of the
-screen. To disable automatic horizontal scrolling, set the variable
+screen. By default, all the lines in the window are scrolled
+horizontally together, but if you set the variable
+@code{auto-hscroll-mode} to the special value of @code{current-line},
+only the line showing the cursor will be scrolled. To disable
+automatic horizontal scrolling entirely, set the variable
@code{auto-hscroll-mode} to @code{nil}. Note that when the automatic
horizontal scrolling is turned off, if point moves off the edge of the
screen, the cursor disappears to indicate that. (On text terminals,
@@ -366,7 +370,10 @@ sufficiently large argument will restore the normal display.
If you use those commands to scroll a window horizontally, that sets
a lower bound for automatic horizontal scrolling. Automatic scrolling
will continue to scroll the window, but never farther to the right
-than the amount you previously set by @code{scroll-left}.
+than the amount you previously set by @code{scroll-left}. When
+@code{auto-hscroll-mode} is set to @code{current-line}, all the lines
+other than the one showing the cursor will be scrolled by that minimal
+amount.
@node Narrowing
@section Narrowing