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

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

[nongnu] elpa/evil-nerd-commenter c2d8cd947e 089/235: remove some intera


From: ELPA Syncer
Subject: [nongnu] elpa/evil-nerd-commenter c2d8cd947e 089/235: remove some interacitve hint and fixed some bug
Date: Thu, 6 Jan 2022 02:59:38 -0500 (EST)

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

    remove some interacitve hint and fixed some bug
---
 evil-nerd-commenter.el | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)

diff --git a/evil-nerd-commenter.el b/evil-nerd-commenter.el
index 43e8523c44..ca000d2fc3 100644
--- a/evil-nerd-commenter.el
+++ b/evil-nerd-commenter.el
@@ -415,10 +415,7 @@ or 'C-u 3 M-x 
evilnc-quick-comment-or-uncomment-to-the-line' to comment to the l
    Case 1: If no region selected, operate on current line. if NUM>1, 
comment/uncomment
    extra N-1 lines from next line
    Case 2: If a region selected, the region is expand to make sure the region 
contain
-   whole lines. Then we operate the expanded region. NUM is ignored.
-"
-  (interactive "NCopy and comment to line: ")
-
+   whole lines. Then we operate the expanded region. NUM is ignored."
   ;; support negative number
   (when (< NUM 0)
     (forward-line (1+ NUM))
@@ -464,7 +461,10 @@ or 'C-u 3 M-x 
evilnc-quick-comment-or-uncomment-to-the-line' to comment to the l
           (if (< (line-beginning-position) b)
               (setq b (line-beginning-position)))
           (if (> (line-end-position) e)
-              (setq e (point-max)))
+              (setq e (line-end-position)))
+          ;; +1 because we need remove the CR
+          (setq e (+ 1 e))
+          (if (> e (point-max)) (setq e (point-max)))
           (kill-region b e)
           ))))
 



reply via email to

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