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

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

[nongnu] elpa/multiple-cursors 7cb18b8 398/434: Fix bug in mc/mark-all-i


From: ELPA Syncer
Subject: [nongnu] elpa/multiple-cursors 7cb18b8 398/434: Fix bug in mc/mark-all-in-region-regexp. Fixes #293
Date: Sat, 7 Aug 2021 09:21:08 -0400 (EDT)

branch: elpa/multiple-cursors
commit 7cb18b8aec7206e7b610069ae42e76bc1fb1be30
Author: Josh Hunsaker <josh+git@nispio.net>
Commit: Josh Hunsaker <josh+git@nispio.net>

    Fix bug in mc/mark-all-in-region-regexp. Fixes #293
---
 mc-mark-more.el | 17 +++++++----------
 1 file changed, 7 insertions(+), 10 deletions(-)

diff --git a/mc-mark-more.el b/mc-mark-more.el
index 27a84b7..2ab7ec7 100644
--- a/mc-mark-more.el
+++ b/mc-mark-more.el
@@ -423,16 +423,13 @@ With zero ARG, skip the last one and mark next."
             (setq lastmatch (point))
             (when (= (point) (match-beginning 0))
               (forward-char)))
-          (when lastmatch (goto-char lastmatch)))
-        (when (> (mc/num-cursors) 0)
-          (goto-char (match-end 0)))
-        (let ((first (mc/furthest-cursor-before-point)))
-          (if (not first)
-              (error "Search failed for %S" search)
-            (mc/pop-state-from-overlay first)))
-        (if (> (mc/num-cursors) 1)
-            (multiple-cursors-mode 1)
-          (multiple-cursors-mode 0))))))
+          (unless lastmatch
+            (error "Search failed for %S" search)))
+          (goto-char (match-end 0))
+        (if (< (mc/num-cursors) 3)
+            (multiple-cursors-mode 0)
+          (mc/pop-state-from-overlay (mc/furthest-cursor-before-point))
+          (multiple-cursors-mode 1))))))
 
 (when (not (fboundp 'set-temporary-overlay-map))
   ;; Backport this function from newer emacs versions



reply via email to

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