[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[nongnu] elpa/multiple-cursors ff0ac1f 322/434: Add function to disable
From: |
ELPA Syncer |
Subject: |
[nongnu] elpa/multiple-cursors ff0ac1f 322/434: Add function to disable mc undo into undo-list. |
Date: |
Sat, 7 Aug 2021 09:20:51 -0400 (EDT) |
branch: elpa/multiple-cursors
commit ff0ac1fc75c7de1645b2d9ca63c5795fa9494215
Author: Aleksei <lexa@hp.cfotr.com>
Commit: Aleksei <lexa@hp.cfotr.com>
Add function to disable mc undo into undo-list.
When user enables mc mode we need to add function to disable mc mode
into undo-list. When users starts to hit 'undo' at some point mc-mode
will be disabled.
---
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))
- [nongnu] elpa/multiple-cursors 9a5c9cd 005/434: Refactored setup of unsupported commands., (continued)
- [nongnu] elpa/multiple-cursors 9a5c9cd 005/434: Refactored setup of unsupported commands., ELPA Syncer, 2021/08/07
- [nongnu] elpa/multiple-cursors 6cac5f4 018/434: Even more white-listing., ELPA Syncer, 2021/08/07
- [nongnu] elpa/multiple-cursors f2da52a 085/434: Update readme with new testing info., ELPA Syncer, 2021/08/07
- [nongnu] elpa/multiple-cursors 8bc7916 094/434: Updated README., ELPA Syncer, 2021/08/07
- [nongnu] elpa/multiple-cursors 3e31cc6 101/434: Merge pull request #5 from milkypostman/master, ELPA Syncer, 2021/08/07
- [nongnu] elpa/multiple-cursors f2add1d 107/434: Suggest C-c C-< instead of the often used M-<, ELPA Syncer, 2021/08/07
- [nongnu] elpa/multiple-cursors 810636b 120/434: Avoid smooth-scroll issues with multiple cursors, ELPA Syncer, 2021/08/07
- [nongnu] elpa/multiple-cursors 2d639b0 284/434: Added tests for new mc/edit-lines, ELPA Syncer, 2021/08/07
- [nongnu] elpa/multiple-cursors 38e590c 292/434: Fix cycle-cursor behavior., ELPA Syncer, 2021/08/07
- [nongnu] elpa/multiple-cursors adf86bd 320/434: Add @lexa to list of contributors, ELPA Syncer, 2021/08/07
- [nongnu] elpa/multiple-cursors ff0ac1f 322/434: Add function to disable mc undo into undo-list.,
ELPA Syncer <=
- [nongnu] elpa/multiple-cursors 952877f 324/434: Revert undo-feature for multiple-cursors, ELPA Syncer, 2021/08/07
- [nongnu] elpa/multiple-cursors 72b4bf3 329/434: Enable to specify search word in mc/mark-all-in-region, ELPA Syncer, 2021/08/07
- [nongnu] elpa/multiple-cursors 97f7b1d 332/434: Merge pull request #197 from kissge/user-emacs-directory, ELPA Syncer, 2021/08/07
- [nongnu] elpa/multiple-cursors 533e157 335/434: Merge pull request #160 from P-Seebauer/master, ELPA Syncer, 2021/08/07
- [nongnu] elpa/multiple-cursors ccdc025 079/434: Run prefix argument commands just once., ELPA Syncer, 2021/08/07
- [nongnu] elpa/multiple-cursors df5f83a 082/434: Add more common commands to run only once., ELPA Syncer, 2021/08/07
- [nongnu] elpa/multiple-cursors 576bf90 087/434: mc version of mark-previous-like-this, ELPA Syncer, 2021/08/07
- [nongnu] elpa/multiple-cursors 0d89125 089/434: Added mc-version of mark-all-like-this, ELPA Syncer, 2021/08/07
- [nongnu] elpa/multiple-cursors f42e467 090/434: Added mc-version of mark-all-in-region, ELPA Syncer, 2021/08/07
- [nongnu] elpa/multiple-cursors b912bf8 096/434: Always require multiple-cursors-core, ELPA Syncer, 2021/08/07