emacs-diffs
[Top][All Lists]
Advanced

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

[Emacs-diffs] /srv/bzr/emacs/trunk r105959: Fix bug #9607 with vertical


From: Eli Zaretskii
Subject: [Emacs-diffs] /srv/bzr/emacs/trunk r105959: Fix bug #9607 with vertical motion when auto-hscroll-mode is disabled.
Date: Thu, 29 Sep 2011 16:03:42 +0300
User-agent: Bazaar (2.3.1)

------------------------------------------------------------
revno: 105959
fixes bug(s): http://debbugs.gnu.org/9607
committer: Eli Zaretskii <address@hidden>
branch nick: trunk
timestamp: Thu 2011-09-29 16:03:42 +0300
message:
  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.
modified:
  lisp/ChangeLog
  lisp/simple.el
=== modified file 'lisp/ChangeLog'
--- a/lisp/ChangeLog    2011-09-29 09:20:45 +0000
+++ b/lisp/ChangeLog    2011-09-29 13:03:42 +0000
@@ -1,3 +1,9 @@
+2011-09-29  Eli Zaretskii  <address@hidden>
+
+       * simple.el (line-move): If auto-hscroll-mode is disabled and the
+       window is hscrolled, move by logical lines.  (Bug#9607)
+       (line-move-visual): Update the doc string to the above effect.
+
 2011-09-29  Martin Rudalics  <address@hidden>
 
        * window.el (display-buffer-record-window): When WINDOW is the

=== modified file 'lisp/simple.el'
--- a/lisp/simple.el    2011-09-28 20:50:16 +0000
+++ b/lisp/simple.el    2011-09-29 13:03:42 +0000
@@ -4244,7 +4244,9 @@
 into account variable-width characters and line continuation.
 If nil, `line-move' moves point by logical lines.
 A non-nil setting of `goal-column' overrides the value of this variable
-and forces movement by logical lines."
+and forces movement by logical lines.
+Disabling `auto-hscroll-mode' also overrides forces movement by logical
+lines when the window is horizontally scrolled."
   :type 'boolean
   :group 'editing-basics
   :version "23.1")
@@ -4321,7 +4323,15 @@
               (not executing-kbd-macro)
               (line-move-partial arg noerror to-end))
     (set-window-vscroll nil 0 t)
-    (if (and line-move-visual (not goal-column))
+    (if (and line-move-visual
+            ;; Display-based column are incompatible with goal-column.
+            (not goal-column)
+            ;; When auto-hscroll-mode is turned off and 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 (and (null auto-hscroll-mode)
+                      (> (window-hscroll) 0))))
        (line-move-visual arg noerror)
       (line-move-1 arg noerror to-end))))
 


reply via email to

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