aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEli Zaretskii2011-09-29 16:03:42 +0300
committerEli Zaretskii2011-09-29 16:03:42 +0300
commitfe5f08dd8f85e6ede64ed0c8406b78e7940662a2 (patch)
treead7bd0d8411c29b800390106479d5637e54cd8df
parente785f2ec1da2f60d24ab1998ff6208fde5c48561 (diff)
downloademacs-fe5f08dd8f85e6ede64ed0c8406b78e7940662a2.tar.gz
emacs-fe5f08dd8f85e6ede64ed0c8406b78e7940662a2.zip
Fix bug #9607 with vertical motion when auto-hscroll-mode is disabled.
lisp/simple.el (line-move): If auto-hscroll-mode is disabled and the window is hscrolled, move by logical lines. (line-move-visual): Update the doc string to the above effect.
-rw-r--r--lisp/ChangeLog6
-rw-r--r--lisp/simple.el14
2 files changed, 18 insertions, 2 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog
index b217a9093f6..42bd14094ba 100644
--- a/lisp/ChangeLog
+++ b/lisp/ChangeLog
@@ -1,3 +1,9 @@
12011-09-29 Eli Zaretskii <eliz@gnu.org>
2
3 * simple.el (line-move): If auto-hscroll-mode is disabled and the
4 window is hscrolled, move by logical lines. (Bug#9607)
5 (line-move-visual): Update the doc string to the above effect.
6
12011-09-29 Martin Rudalics <rudalics@gmx.at> 72011-09-29 Martin Rudalics <rudalics@gmx.at>
2 8
3 * window.el (display-buffer-record-window): When WINDOW is the 9 * window.el (display-buffer-record-window): When WINDOW is the
diff --git a/lisp/simple.el b/lisp/simple.el
index 14ce5ed18ec..1ab90792bfa 100644
--- a/lisp/simple.el
+++ b/lisp/simple.el
@@ -4244,7 +4244,9 @@ screen, instead of relying on buffer contents alone. It takes
4244into account variable-width characters and line continuation. 4244into account variable-width characters and line continuation.
4245If nil, `line-move' moves point by logical lines. 4245If nil, `line-move' moves point by logical lines.
4246A non-nil setting of `goal-column' overrides the value of this variable 4246A non-nil setting of `goal-column' overrides the value of this variable
4247and forces movement by logical lines." 4247and forces movement by logical lines.
4248Disabling `auto-hscroll-mode' also overrides forces movement by logical
4249lines when the window is horizontally scrolled."
4248 :type 'boolean 4250 :type 'boolean
4249 :group 'editing-basics 4251 :group 'editing-basics
4250 :version "23.1") 4252 :version "23.1")
@@ -4321,7 +4323,15 @@ and forces movement by logical lines."
4321 (not executing-kbd-macro) 4323 (not executing-kbd-macro)
4322 (line-move-partial arg noerror to-end)) 4324 (line-move-partial arg noerror to-end))
4323 (set-window-vscroll nil 0 t) 4325 (set-window-vscroll nil 0 t)
4324 (if (and line-move-visual (not goal-column)) 4326 (if (and line-move-visual
4327 ;; Display-based column are incompatible with goal-column.
4328 (not goal-column)
4329 ;; When auto-hscroll-mode is turned off and the text in
4330 ;; the window is scrolled to the left, display-based
4331 ;; motion doesn't make sense (because each logical line
4332 ;; occupies exactly one screen line).
4333 (not (and (null auto-hscroll-mode)
4334 (> (window-hscroll) 0))))
4325 (line-move-visual arg noerror) 4335 (line-move-visual arg noerror)
4326 (line-move-1 arg noerror to-end)))) 4336 (line-move-1 arg noerror to-end))))
4327 4337