[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[nongnu] elpa/evil-nerd-commenter 7e9bb3256c 123/235: invert comment bug
From: |
ELPA Syncer |
Subject: |
[nongnu] elpa/evil-nerd-commenter 7e9bb3256c 123/235: invert comment bug when used with text object #53 |
Date: |
Thu, 6 Jan 2022 02:59:41 -0500 (EST) |
branch: elpa/evil-nerd-commenter
commit 7e9bb3256cde919b40fffb9585c48745c64d0929
Author: Chen Bin <chenbin.sh@gmail.com>
Commit: Chen Bin <chenbin.sh@gmail.com>
invert comment bug when used with text object #53
- `C-u 2 M-x evilnc-comment-operator j` comment 3 lines instead 2 lines
- Only happens on evil text object
- Thanks to Dickby for the fix
---
README.org | 4 ++--
evil-nerd-commenter-operator.el | 2 +-
evil-nerd-commenter.el | 2 +-
3 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/README.org b/README.org
index f4b7b0cb44..216fa5dcb8 100644
--- a/README.org
+++ b/README.org
@@ -113,7 +113,7 @@ Toggle flag evilnc-invert-comment-line-by-line.
When the flag is true, the command "evilnc-comment-or-uncomment-lines",
"evilnc-comment-or-uncomment-to-the-line", and
"evilnc-comment-or-uncomment-paragraphs" will be influenced. They will *invert*
each line's comment status instead comment the whole thing.
-Please note this command does NOT work on evil text object.
+Please note this command may NOT work on complex evil text object.
*** evilnc-kill-to-line
Kill from the current line to the user-specified line.
@@ -163,7 +163,7 @@ The first line is production code. The second line is your
debug code. You want
All you need to is "M-x evilnc-toggle-invert-comment-line-by-line" then "C-u 2
evilnc-comment-or-uncomment-lines". The first command turn on some flag, so the
behavior of (un)commenting is different.
* Evil usage
-If you use [[http://emacswiki.org/emacs/Evil][Evil]], you can use
[[http://vimdoc.sourceforge.net/htmldoc/motion.html#text-objects][text objects
and motions]].
+If you use [[http://emacswiki.org/emacs/Evil][Evil]], you can use
[[http://vimdoc.sourceforge.net/htmldoc/motion.html#text-objects][text objects
and motions]]. But if you only *deals with lines*, I suggest *using
evilnc-comment-or-uncomment-lines instead*.
"evilnc-comment-operator" acts much like the delete/change operator. Takes a
motion or text object and comments it out, yanking its content in the process.
diff --git a/evil-nerd-commenter-operator.el b/evil-nerd-commenter-operator.el
index 28c14c3615..2e20ed8112 100644
--- a/evil-nerd-commenter-operator.el
+++ b/evil-nerd-commenter-operator.el
@@ -52,7 +52,7 @@
(= (char-before beg) ?\n))
(evilnc--comment-or-uncomment-region (1- beg) end))
((eq type 'line)
- (evilnc--comment-or-uncomment-region beg end))
+ (evilnc--comment-or-uncomment-region beg (1- end)))
(t
(let ((newpos (evilnc--extend-to-whole-comment beg end) ))
(evilnc--comment-or-uncomment-region (nth 0 newpos) (nth 1 newpos))
diff --git a/evil-nerd-commenter.el b/evil-nerd-commenter.el
index 353fad83c3..e510d48bb2 100644
--- a/evil-nerd-commenter.el
+++ b/evil-nerd-commenter.el
@@ -436,7 +436,7 @@ or 'C-u 3 M-x
evilnc-quick-comment-or-uncomment-to-the-line' to comment to the l
;;;###autoload
(defun evilnc-toggle-invert-comment-line-by-line ()
- "Please note this command does NOT work on evil text objects"
+ "Please note this command may NOT work on complex evil text objects"
(interactive)
(if evilnc-invert-comment-line-by-line
(setq evilnc-invert-comment-line-by-line nil)
- [nongnu] elpa/evil-nerd-commenter 81e16b5fd1 095/235: Merge branch 'TheBB-master', (continued)
- [nongnu] elpa/evil-nerd-commenter 81e16b5fd1 095/235: Merge branch 'TheBB-master', ELPA Syncer, 2022/01/06
- [nongnu] elpa/evil-nerd-commenter 155d608d21 094/235: v1.5.4 minor fix, ELPA Syncer, 2022/01/06
- [nongnu] elpa/evil-nerd-commenter f1fe14e756 102/235: updated workaround doc for emacs24.4, ELPA Syncer, 2022/01/06
- [nongnu] elpa/evil-nerd-commenter 7557777d8f 103/235: Try to require evil when compiling, ELPA Syncer, 2022/01/06
- [nongnu] elpa/evil-nerd-commenter c54cee2648 105/235: updated README v1.5.9, ELPA Syncer, 2022/01/06
- [nongnu] elpa/evil-nerd-commenter df140cc439 104/235: Merge pull request #41 from ryuslash/require-evil, ELPA Syncer, 2022/01/06
- [nongnu] elpa/evil-nerd-commenter dbfddd4802 108/235: FIX: all nodes expanded when commenting code-block in org file v1.5.11, ELPA Syncer, 2022/01/06
- [nongnu] elpa/evil-nerd-commenter e4741fb3e0 112/235: Latest web-mode remove web-mode-is-comment v1.5.13, ELPA Syncer, 2022/01/06
- [nongnu] elpa/evil-nerd-commenter c9aa338e92 116/235: fixed typo on version, ELPA Syncer, 2022/01/06
- [nongnu] elpa/evil-nerd-commenter 5833d2587c 122/235: updated README on invert comment, ELPA Syncer, 2022/01/06
- [nongnu] elpa/evil-nerd-commenter 7e9bb3256c 123/235: invert comment bug when used with text object #53,
ELPA Syncer <=
- [nongnu] elpa/evil-nerd-commenter aed1386b6c 126/235: remove dependency on cl, v2.1, ELPA Syncer, 2022/01/06
- [nongnu] elpa/evil-nerd-commenter 372758d919 134/235: clean code, ELPA Syncer, 2022/01/06
- [nongnu] elpa/evil-nerd-commenter 3eadae264f 138/235: new evil-mode operator "evil-copy-and-comment-operator", ELPA Syncer, 2022/01/06
- [nongnu] elpa/evil-nerd-commenter 9349468db8 148/235: Remove autoloads for evil text objects, ELPA Syncer, 2022/01/06
- [nongnu] elpa/evil-nerd-commenter cac2f7945f 151/235: handle one line comment properly, ELPA Syncer, 2022/01/06
- [nongnu] elpa/evil-nerd-commenter 96f76a67a3 153/235: evilnc-comment-text-object: doc-string fix, ELPA Syncer, 2022/01/06
- [nongnu] elpa/evil-nerd-commenter 684f558931 152/235: visual-state key bindings, ELPA Syncer, 2022/01/06
- [nongnu] elpa/evil-nerd-commenter dac58399e8 158/235: select/yank text object of irregular lines, ELPA Syncer, 2022/01/06
- [nongnu] elpa/evil-nerd-commenter 498ac2dbbd 154/235: Merge pull request #75 from duianto/patch-1, ELPA Syncer, 2022/01/06
- [nongnu] elpa/evil-nerd-commenter 0a46b91120 157/235: more precise inner comment text object, ELPA Syncer, 2022/01/06