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

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

[nongnu] elpa/evil-surround 346d4d85fc 150/175: Fix dot repeat with coun


From: ELPA Syncer
Subject: [nongnu] elpa/evil-surround 346d4d85fc 150/175: Fix dot repeat with counted motions
Date: Mon, 9 Oct 2023 13:01:15 -0400 (EDT)

branch: elpa/evil-surround
commit 346d4d85fcf1f9517e9c4991c1efe68b4130f93a
Author: Yiming Chen <dsdshcym@gmail.com>
Commit: ninrod <filipe.silva@gmail.com>

    Fix dot repeat with counted motions
    
    - rel: #133
---
 evil-surround.el           | 3 +++
 test/evil-surround-test.el | 8 ++++++++
 2 files changed, 11 insertions(+)

diff --git a/evil-surround.el b/evil-surround.el
index bd80d3035c..2fb79a8890 100644
--- a/evil-surround.el
+++ b/evil-surround.el
@@ -377,6 +377,9 @@ Becomes this:
    }"
 
   (interactive (evil-surround-input-region-char))
+  (if evil-this-motion-count
+    (evil-repeat-record (int-to-string evil-this-motion-count)))
+
   (when (evil-surround-valid-char-p char)
     (let* ((overlay (make-overlay beg end nil nil t))
            (pair (or (and (boundp 'pair) pair) (evil-surround-pair char)))
diff --git a/test/evil-surround-test.el b/test/evil-surround-test.el
index 73d4b69cf8..1da5d37d8b 100644
--- a/test/evil-surround-test.el
+++ b/test/evil-surround-test.el
@@ -166,6 +166,14 @@
       "one two 'three'"
       ("W.") ;; repeat delete surround
       "one two three"))
+  (ert-info ("repeat surrounding with count")
+    (evil-test-buffer
+      "[o]ne two three\none two three"
+      (turn-on-evil-surround-mode)
+      ("ys2wb")
+      "(one two) three\none two three"
+      ("j.")
+      "(one two) three\n(one two) three"))
   (ert-info ("visual surrounding")
     (evil-test-buffer
       "<one two> three\nfour\n"



reply via email to

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