emacs-diffs
[Top][All Lists]
Advanced

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

[Emacs-diffs] master de53dfc: Fix vertical cursor motion when columns ar


From: Eli Zaretskii
Subject: [Emacs-diffs] master de53dfc: Fix vertical cursor motion when columns are of unequal size
Date: Wed, 10 May 2017 12:59:49 -0400 (EDT)

branch: master
commit de53dfcea3e1fdc6af171678300deb591b509cc4
Author: Eli Zaretskii <address@hidden>
Commit: Eli Zaretskii <address@hidden>

    Fix vertical cursor motion when columns are of unequal size
    
    * lisp/simple.el (line-move-finish): In line-move-visual mode, use
    vertical-motion to move to the goal column, as the goal column
    should in that case be interpreted in units of frame's canonical
    character width.  (Bug#26852)
---
 lisp/simple.el | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)

diff --git a/lisp/simple.el b/lisp/simple.el
index edc822e..dfa3037 100644
--- a/lisp/simple.el
+++ b/lisp/simple.el
@@ -6399,7 +6399,12 @@ If NOERROR, don't signal an error if we can't move that 
many lines."
               (point))))
 
        ;; Move to the desired column.
-       (line-move-to-column (truncate column))
+        (if line-move-visual
+            ;; Under line-move-visual, goal-column should be
+            ;; interpreted in units of the frame's canonical character
+            ;; width, which is exactly what vertical-motion does.
+            (vertical-motion (cons column 0))
+          (line-move-to-column (truncate column)))
 
        ;; Corner case: suppose we start out in a field boundary in
        ;; the middle of a continued line.  When we get to



reply via email to

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