emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Emacs-diffs] trunk r114799: Fix bug #15712 with vertical motion when th


From: Eli Zaretskii
Subject: [Emacs-diffs] trunk r114799: Fix bug #15712 with vertical motion when the goal column needs to hscroll.
Date: Fri, 25 Oct 2013 09:47:09 +0000
User-agent: Bazaar (2.6b2)

------------------------------------------------------------
revno: 114799
revision-id: address@hidden
parent: address@hidden
fixes bug: http://debbugs.gnu.org/15712
committer: Eli Zaretskii <address@hidden>
branch nick: trunk
timestamp: Fri 2013-10-25 12:45:51 +0300
message:
  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.
modified:
  lisp/ChangeLog                 changelog-20091113204419-o5vbwnq5f7feedwu-1432
  lisp/simple.el                 simple.el-20091113204419-o5vbwnq5f7feedwu-403
=== modified file 'lisp/ChangeLog'
--- a/lisp/ChangeLog    2013-10-25 04:35:56 +0000
+++ b/lisp/ChangeLog    2013-10-25 09:45:51 +0000
@@ -1,3 +1,10 @@
+2013-10-25  Eli Zaretskii  <address@hidden>
+
+       * 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  <address@hidden>
 
        * progmodes/ruby-mode.el (ruby-mode-menu): Use proper

=== modified file 'lisp/simple.el'
--- a/lisp/simple.el    2013-10-19 22:17:56 +0000
+++ b/lisp/simple.el    2013-10-25 09:45:51 +0000
@@ -4908,7 +4908,16 @@
               ;; 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.


reply via email to

[Prev in Thread] Current Thread [Next in Thread]