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

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

[nongnu] elpa/multiple-cursors f0dcd06 323/434: Merge pull request #175


From: ELPA Syncer
Subject: [nongnu] elpa/multiple-cursors f0dcd06 323/434: Merge pull request #175 from lexa/master
Date: Sat, 7 Aug 2021 09:20:51 -0400 (EDT)

branch: elpa/multiple-cursors
commit f0dcd06c6fabaff8d1ba1bd94d5c0cda5fec2f89
Merge: 82586a0 ff0ac1f
Author: Magnar Sveen <magnars@gmail.com>
Commit: Magnar Sveen <magnars@gmail.com>

    Merge pull request #175 from lexa/master
    
    Add function to disable mc undo into undo-list.
---
 features/multiple-cursors-core.feature | 12 ++++++++++++
 multiple-cursors-core.el               |  1 +
 2 files changed, 13 insertions(+)

diff --git a/features/multiple-cursors-core.feature 
b/features/multiple-cursors-core.feature
index 3bd4103..73259f8 100644
--- a/features/multiple-cursors-core.feature
+++ b/features/multiple-cursors-core.feature
@@ -73,6 +73,18 @@ Feature: Multiple cursors core
     And I type "!"
     Then I should see "This !text contains the word !text twice"
 
+  Scenario: Undo until mc mode will be disabled
+    Given I have cursors at "text" in "This text contains the word text twice"
+    And I should have 2 cursors
+    When I press "C-g"
+    And I should have 1 cursors
+    And I press "C-_"
+    And I should have 2 cursors
+    And I press "C-_"
+    And I should have 1 cursors
+    And I type "!"
+    Then I should see "This !text contains the word text twice"
+
   Scenario: Setting and popping mark
     Given I have cursors at "text" in "This text contains the word text twice"
     And I press "C-SPC"
diff --git a/multiple-cursors-core.el b/multiple-cursors-core.el
index a0d10ef..2c76b42 100644
--- a/multiple-cursors-core.el
+++ b/multiple-cursors-core.el
@@ -505,6 +505,7 @@ They are temporarily disabled when multiple-cursors are 
active.")
   (if multiple-cursors-mode
       (progn
         (mc/temporarily-disable-unsupported-minor-modes)
+        (push `(apply multiple-cursors-mode . ,(list 0)) buffer-undo-list)
         (add-hook 'pre-command-hook 'mc/make-a-note-of-the-command-being-run 
nil t)
         (add-hook 'post-command-hook 'mc/execute-this-command-for-all-cursors 
t t)
         (run-hooks 'multiple-cursors-mode-enabled-hook))



reply via email to

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