[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] master 2367c15: Fix vertical cursor motion when cursor is
From: |
Eli Zaretskii |
Subject: |
[Emacs-diffs] master 2367c15: Fix vertical cursor motion when cursor is on the fringe |
Date: |
Sun, 13 Aug 2017 10:54:47 -0400 (EDT) |
branch: master
commit 2367c15b18dd6b3aaf82bdbab9d2e833ec838ef4
Author: Eli Zaretskii <address@hidden>
Commit: Eli Zaretskii <address@hidden>
Fix vertical cursor motion when cursor is on the fringe
* lisp/simple.el (line-move-visual): Fix an off-by-one error in
setting temporary-goal-column when newline overflows into the
fringe. Support that use case in R2L paragraphs as well.
---
lisp/simple.el | 7 ++++---
1 file changed, 4 insertions(+), 3 deletions(-)
diff --git a/lisp/simple.el b/lisp/simple.el
index 16f69f2..58f8372 100644
--- a/lisp/simple.el
+++ b/lisp/simple.el
@@ -6261,9 +6261,10 @@ If NOERROR, don't signal an error if we can't move that
many lines."
(let ((posn (posn-at-point))
x-pos)
(cond
- ;; Handle the `overflow-newline-into-fringe' case:
- ((eq (nth 1 posn) 'right-fringe)
- (setq temporary-goal-column (cons (- (window-width) 1) hscroll)))
+ ;; Handle the `overflow-newline-into-fringe' case
+ ;; (left-fringe is for the R2L case):
+ ((memq (nth 1 posn) '(right-fringe left-fringe))
+ (setq temporary-goal-column (cons (window-width) hscroll)))
((car (posn-x-y posn))
(setq x-pos (car (posn-x-y posn)))
;; In R2L lines, the X pixel coordinate is measured from the
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Emacs-diffs] master 2367c15: Fix vertical cursor motion when cursor is on the fringe,
Eli Zaretskii <=