[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[nongnu] elpa/evil 9e27bb9e5a: No performant delete if range supplied
|
From: |
ELPA Syncer |
|
Subject: |
[nongnu] elpa/evil 9e27bb9e5a: No performant delete if range supplied |
|
Date: |
Tue, 23 Jan 2024 12:59:38 -0500 (EST) |
branch: elpa/evil
commit 9e27bb9e5a66cacbf9f1f4f20ca9b30fc2ae297b
Author: Tom Dalziel <tom_dl@hotmail.com>
Commit: Tom Dalziel <33435574+tomdl89@users.noreply.github.com>
No performant delete if range supplied
Fixes #1858
---
evil-commands.el | 2 +-
evil-tests.el | 5 +++++
2 files changed, 6 insertions(+), 1 deletion(-)
diff --git a/evil-commands.el b/evil-commands.el
index 286cf9465a..3404805c21 100644
--- a/evil-commands.el
+++ b/evil-commands.el
@@ -4212,7 +4212,7 @@ Use `evil-flush-lines' if INVERT is nil, or
`evil-keep-lines' if not."
(when (and pattern command)
(when evil-ex-search-vim-style-regexp
(setq pattern (evil-transform-vim-style-regexp pattern)))
- (if (and ex-delete (not (nth 3 command-form)))
+ (if (and ex-delete (not (nth 3 command-form)) (not (nth 1 command-form)))
(evil--ex-performant-global-delete beg end pattern invert)
(setq isearch-string pattern)
(isearch-update-ring pattern t)
diff --git a/evil-tests.el b/evil-tests.el
index 09569f1574..8dfaf1d173 100644
--- a/evil-tests.el
+++ b/evil-tests.el
@@ -8668,6 +8668,11 @@ maybe we need one line more with some text\n")
"[n]o 1\nno 2\nno 3\nyes 4\nno 5\nno 6\nno 7\n"
(":g/yes/d2" [return])
"no 1\nno 2\nno 3\n[n]o 6\nno 7\n"))
+ (ert-info ("global delete with range")
+ (evil-test-buffer
+ "alpha\nbravo\ncharlie\ndelta\ncharlie\necho\ngolf\ncharlie\nhotel"
+ (":g/charlie/-1d")
+ "alpha\ncharlie\ncharlie\necho\ncharlie\nhotel"))
(ert-info ("global substitute")
(evil-test-buffer
"[n]o 1\nno 2\nno 3\nyes 4\nno 5\nno 6\nno 7\n"
| [Prev in Thread] |
Current Thread |
[Next in Thread] |
- [nongnu] elpa/evil 9e27bb9e5a: No performant delete if range supplied,
ELPA Syncer <=