diff options
| author | Eli Zaretskii | 2013-10-25 12:45:51 +0300 |
|---|---|---|
| committer | Eli Zaretskii | 2013-10-25 12:45:51 +0300 |
| commit | fbfd0e1d751dd142064b9aaebbf71818d99ae5f1 (patch) | |
| tree | 251be92fb13f2d00e7c6bbfdb519cb109d5c35d3 | |
| parent | 6702c559da3fa6b5a94c42039c9f93d7b2b1fe83 (diff) | |
| download | emacs-fbfd0e1d751dd142064b9aaebbf71818d99ae5f1.tar.gz emacs-fbfd0e1d751dd142064b9aaebbf71818d99ae5f1.zip | |
Fix bug #15712 with vertical motion when the goal column needs to hscroll.
lisp/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.
| -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 @@ | |||
| 1 | 2013-10-25 Eli Zaretskii <eliz@gnu.org> | ||
| 2 | |||
| 3 | * simple.el (line-move): Call line-move-1 instead of | ||
| 4 | line-move-visual when the current window hscroll is zero, but | ||
| 5 | temporary-goal-column indicates we will need to hscroll as result | ||
| 6 | of the movement. (Bug#15712) | ||
| 7 | |||
| 1 | 2013-10-25 Dmitry Gutov <dgutov@yandex.ru> | 8 | 2013-10-25 Dmitry Gutov <dgutov@yandex.ru> |
| 2 | 9 | ||
| 3 | * progmodes/ruby-mode.el (ruby-mode-menu): Use proper | 10 | * 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." | |||
| 4908 | ;; When the text in the window is scrolled to the left, | 4908 | ;; When the text in the window is scrolled to the left, |
| 4909 | ;; display-based motion doesn't make sense (because each | 4909 | ;; display-based motion doesn't make sense (because each |
| 4910 | ;; logical line occupies exactly one screen line). | 4910 | ;; logical line occupies exactly one screen line). |
| 4911 | (not (> (window-hscroll) 0))) | 4911 | (not (> (window-hscroll) 0)) |
| 4912 | ;; Likewise when the text _was_ scrolled to the left | ||
| 4913 | ;; when the current run of vertical motion commands | ||
| 4914 | ;; started. | ||
| 4915 | (not (and (memq last-command | ||
| 4916 | `(next-line previous-line ,this-command)) | ||
| 4917 | auto-hscroll-mode | ||
| 4918 | (numberp temporary-goal-column) | ||
| 4919 | (>= temporary-goal-column | ||
| 4920 | (- (window-width) hscroll-margin))))) | ||
| 4912 | (prog1 (line-move-visual arg noerror) | 4921 | (prog1 (line-move-visual arg noerror) |
| 4913 | ;; If we moved into a tall line, set vscroll to make | 4922 | ;; If we moved into a tall line, set vscroll to make |
| 4914 | ;; scrolling through tall images more smooth. | 4923 | ;; scrolling through tall images more smooth. |