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

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

[nongnu] elpa/evil-nerd-commenter 36304a689b 184/235: tested in Emacs 24


From: ELPA Syncer
Subject: [nongnu] elpa/evil-nerd-commenter 36304a689b 184/235: tested in Emacs 24.4
Date: Thu, 6 Jan 2022 02:59:46 -0500 (EST)

branch: elpa/evil-nerd-commenter
commit 36304a689bd87af7b8a4a4e904c07b339a6d2f2c
Author: Chen Bin <chenbin.sh@gmail.com>
Commit: Chen Bin <chenbin.sh@gmail.com>

    tested in Emacs 24.4
---
 evil-nerd-commenter.el | 15 +++++++++------
 1 file changed, 9 insertions(+), 6 deletions(-)

diff --git a/evil-nerd-commenter.el b/evil-nerd-commenter.el
index e93635fd0a..cbe8d9afcb 100644
--- a/evil-nerd-commenter.el
+++ b/evil-nerd-commenter.el
@@ -197,12 +197,15 @@ See 
http://lists.gnu.org/archive/html/bug-gnu-emacs/2013-03/msg00891.html.";
 
 (defun evilnc--forward-line (num)
   "Move NUM source or screen lines forward, depending on visual-line settings."
-  (if (or (and visual-line-mode
-               (or (not evil-mode)
-                   (bound-and-true-p evil-respect-visual-line-mode)))
-          (eq display-line-numbers-type 'visual))
-      (vertical-motion num)
-    (forward-line num)))
+  (cond
+   ((or (and visual-line-mode
+             (or (not (bound-and-true-p evil-mode))
+                 (bound-and-true-p evil-respect-visual-line-mode)))
+        (and (boundp 'display-line-numbers-type)
+             (eq display-line-numbers-type 'visual)))
+    (vertical-motion num))
+   (t
+    (forward-line num))))
 
 (defun evilnc--operation-on-lines-or-region (fn &optional num)
   "Apply FN on NUM lines or selected region."



reply via email to

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