emacs-elpa-diffs
[Top][All Lists]
Advanced

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

[nongnu] elpa/evil 5a9cfbc443: Prevent setting a negative value for `tem


From: ELPA Syncer
Subject: [nongnu] elpa/evil 5a9cfbc443: Prevent setting a negative value for `temporary-goal-column`
Date: Tue, 10 May 2022 19:58:05 -0400 (EDT)

branch: elpa/evil
commit 5a9cfbc443219c4063b17853b7828ec0a00d2736
Author: Sean Smith <scsmithr@gmail.com>
Commit: Tom Dalziel <33435574+tomdl89@users.noreply.github.com>

    Prevent setting a negative value for `temporary-goal-column`
---
 evil-common.el | 8 ++++++--
 1 file changed, 6 insertions(+), 2 deletions(-)

diff --git a/evil-common.el b/evil-common.el
index 672e34381c..6b9f6944dc 100644
--- a/evil-common.el
+++ b/evil-common.el
@@ -993,8 +993,12 @@ so it is more compatible with evil's notions of eol & 
tracking."
            (debug t))
   (let ((normalize-temporary-goal-column
          `(if (consp temporary-goal-column)
-              (setq temporary-goal-column (+ (car temporary-goal-column)
-                                             (cdr temporary-goal-column))))))
+              ;; Ensure a negative value is never set for 
`temporary-goal-column'
+              ;; as it may have a negative component when both 
`whitespace-mode'
+              ;; and `display-line-numbers-mode' are enabled.
+              ;; See #1297
+              (setq temporary-goal-column (max 0 (+ (car temporary-goal-column)
+                                                    (cdr 
temporary-goal-column)))))))
     `(progn
        (unless evil-start-of-line (setq this-command 'next-line))
        ,normalize-temporary-goal-column



reply via email to

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