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

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

[nongnu] elpa/evil-nerd-commenter 277ea53931 067/235: Fixed uncommenting


From: ELPA Syncer
Subject: [nongnu] elpa/evil-nerd-commenter 277ea53931 067/235: Fixed uncommenting line "spilling" to next line
Date: Thu, 6 Jan 2022 02:59:35 -0500 (EST)

branch: elpa/evil-nerd-commenter
commit 277ea53931807d966799502dfcb771a1494e90ef
Author: untf <like.an.acerboss@gmail.com>
Commit: untf <like.an.acerboss@gmail.com>

    Fixed uncommenting line "spilling" to next line
    
    When there are two lines to be uncommented, e.g.
    
    ;; foo
    ;; bar
    
    and foo is uncommented using evilnc-hotkey-comment-operator, bar would also 
be uncommented.  The most likely explanation is that end passed in 
(evilnc--extend-to-whole-comment beg end) is on the next line.
    
    Avoided this case by avoiding evilnc--extend-to-whole-comment when 
commenting/uncommenting lines.
---
 evil-nerd-commenter.el | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/evil-nerd-commenter.el b/evil-nerd-commenter.el
index d609b8e94d..bc3731a52d 100644
--- a/evil-nerd-commenter.el
+++ b/evil-nerd-commenter.el
@@ -416,6 +416,8 @@ Save in REGISTER or in the kill-ring with YANK-HANDLER."
               (/= beg (point-min))
               (=  (char-before beg) ?\n))
          (comment-or-uncomment-region (1- beg) end))
+        ((eq type 'line)
+           (comment-or-uncomment-region beg end)) 
         (t
          (let ((newpos (evilnc--extend-to-whole-comment beg end) ))
            (comment-or-uncomment-region (nth 0 newpos) (nth 1 newpos))



reply via email to

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