diff options
Diffstat (limited to 'lisp')
-rw-r--r-- | lisp/ChangeLog | 7 | ||||
-rw-r--r-- | lisp/simple.el | 11 |
2 files changed, 17 insertions, 1 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 07de60c735d..c7da1c86416 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,10 @@ +2013-10-25 Eli Zaretskii <eliz@gnu.org> + + * simple.el (line-move): Call line-move-1 instead of + line-move-visual when the current window hscroll is zero, but + temporary-goal-column indicates we will need to hscroll as result + of the movement. (Bug#15712) + 2013-10-25 Dmitry Gutov <dgutov@yandex.ru> * progmodes/ruby-mode.el (ruby-mode-menu): Use proper diff --git a/lisp/simple.el b/lisp/simple.el index 3fefce15d2a..1f1b5cb376f 100644 --- a/lisp/simple.el +++ b/lisp/simple.el @@ -4908,7 +4908,16 @@ The value is a floating-point number." ;; When the text in the window is scrolled to the left, ;; display-based motion doesn't make sense (because each ;; logical line occupies exactly one screen line). - (not (> (window-hscroll) 0))) + (not (> (window-hscroll) 0)) + ;; Likewise when the text _was_ scrolled to the left + ;; when the current run of vertical motion commands + ;; started. + (not (and (memq last-command + `(next-line previous-line ,this-command)) + auto-hscroll-mode + (numberp temporary-goal-column) + (>= temporary-goal-column + (- (window-width) hscroll-margin))))) (prog1 (line-move-visual arg noerror) ;; If we moved into a tall line, set vscroll to make ;; scrolling through tall images more smooth. |