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

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

[nongnu] elpa/evil 30ebe6df27: Remove unnecessary post-command hook run


From: ELPA Syncer
Subject: [nongnu] elpa/evil 30ebe6df27: Remove unnecessary post-command hook run
Date: Sun, 21 Jul 2024 19:00:36 -0400 (EDT)

branch: elpa/evil
commit 30ebe6df27c36fdf2ea3c82a916edec31acc2647
Author: Tom Dalziel <tom_dl@hotmail.com>
Commit: Tom Dalziel <tom_dl@hotmail.com>

    Remove unnecessary post-command hook run
---
 evil-states.el |  3 +--
 evil-tests.el  | 19 +++++++++++++++++--
 2 files changed, 18 insertions(+), 4 deletions(-)

diff --git a/evil-states.el b/evil-states.el
index 62a612a9f0..1e09ae73fb 100644
--- a/evil-states.el
+++ b/evil-states.el
@@ -179,8 +179,7 @@ Handles the repeat-count of the insertion command."
                       (move-to-column col t)
                     (funcall col))
                   (dotimes (_ (or evil-insert-count 1))
-                    (evil-execute-repeat-info (cdr 
evil-insert-repeat-info))))))
-            (run-hooks 'post-command-hook))))))
+                    (evil-execute-repeat-info (cdr 
evil-insert-repeat-info)))))))))))
   (and evil-want-fine-undo (evil-end-undo-step)))
 
 ;;; Visual state
diff --git a/evil-tests.el b/evil-tests.el
index 96bf2a63f5..01af626091 100644
--- a/evil-tests.el
+++ b/evil-tests.el
@@ -1652,6 +1652,17 @@ New Tex[t]
       ((kbd "C-v") "jj$AXXX" [escape])
       "line 1line 1line 1XX[X]\nline 2XXX\nline 3line 3XXX\n")))
 
+(ert-deftest evil-visual-block-insert ()
+  "Test inserting (prepending) in visual block."
+  :tags '(evil visual insert)
+  (ert-info ("Prepend and repeat")
+    (evil-test-buffer
+      "[a]lpha\nbravo\ncharlie\ndelta\necho\nfoxtrot\ngolf"
+      ("\C-v" "jj" "I" "zulu" [escape])
+      "zul[u]alpha\nzulubravo\nzulucharlie\ndelta\necho\nfoxtrot\ngolf"
+      ("/delta" [return] ".")
+      
"zulualpha\nzulubravo\nzulucharlie\nzul[u]delta\nzuluecho\nzulufoxtrot\ngolf")))
+
 (ert-deftest evil-test-repeat-digraph ()
   "Test repeat of insertion of a digraph."
   :tags '(evil digraph repeat)
@@ -9734,7 +9745,9 @@ parameter set."
               "new buffe[r]")
           (delete-file temp-file)
           (let ((buf (file-name-nondirectory temp-file)))
-            (when (get-buffer buf) (kill-buffer buf))))))
+            (when (get-buffer buf)
+              (with-current-buffer buf (set-buffer-modified-p nil))
+              (kill-buffer buf))))))
     (ert-info ("Jump multiple times between files")
       (let ((a (make-temp-file "evil-aa-" nil nil "evil-bb\n\nthis is a"))
             (b (make-temp-file "evil-bb-" nil nil "evil-cc\n\nthis is b"))
@@ -9752,7 +9765,9 @@ parameter set."
               "this is c")
           (dolist (f (list a b c))
             (let ((buf (file-name-nondirectory f)))
-              (when (get-buffer buf) (kill-buffer buf)))
+              (when (get-buffer buf)
+                (with-current-buffer buf (set-buffer-modified-p nil))
+                (kill-buffer buf)))
             (delete-file f)))))))
 
 (ert-deftest evil-test-find-file ()



reply via email to

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