[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] externals/speedrect 2f46cbec96 07/16: multiple-cursors: recall la
From: |
ELPA Syncer |
Subject: |
[elpa] externals/speedrect 2f46cbec96 07/16: multiple-cursors: recall last rectangle rect when completed |
Date: |
Tue, 17 Dec 2024 18:59:40 -0500 (EST) |
branch: externals/speedrect
commit 2f46cbec9647f1e7d8bf271b90d42f65a71b8f18
Author: JD Smith <93749+jdtsmith@users.noreply.github.com>
Commit: JD Smith <93749+jdtsmith@users.noreply.github.com>
multiple-cursors: recall last rectangle rect when completed
I.e. with Ret or C-g is called and MC is disabled, recall-last
---
speedrect.el | 12 +++++++++++-
1 file changed, 11 insertions(+), 1 deletion(-)
diff --git a/speedrect.el b/speedrect.el
index ae24c3c1ae..c5fe6bf821 100644
--- a/speedrect.el
+++ b/speedrect.el
@@ -323,6 +323,14 @@ inserted text."
;;*
;;;; Multiple Cursors
+(defun speedrect--mc-restart ()
+ "Restart speedrect with stored rectangle.
+Also removes itself from `multiple-cursors-mode-hook'."
+ (unless multiple-cursors-mode
+ (remove-hook 'multiple-cursors-mode-hook
+ #'speedrect--mc-restart t)
+ (speedrect-recall-last)))
+
(declare-function mc/edit-lines "mc-edit-lines")
(defun speedrect-multiple-cursors ()
"Add multiple cursors on each line at the current column."
@@ -332,7 +340,9 @@ inserted text."
(error (user-error "Multiple-cursors not found"))
(:success
(let ((col (current-column)))
- (speedrect-stash)
+ (speedrect-quit)
+ (add-hook 'multiple-cursors-mode-hook
+ #'speedrect--mc-restart nil t)
(exchange-point-and-mark)
(move-to-column col)
(mc/edit-lines)))))
- [elpa] externals/speedrect updated (8cda38a010 -> c6e5e1fe7e), ELPA Syncer, 2024/12/17
- [elpa] externals/speedrect a472d721c2 04/16: wrap: alias wrapped functions (with --speedrect_wrap) for keycast, ELPA Syncer, 2024/12/17
- [elpa] externals/speedrect 0150882424 02/16: yank-from-calc: delete existing rectangle first, ELPA Syncer, 2024/12/17
- [elpa] externals/speedrect 9025ae3b49 11/16: Update README.md, ELPA Syncer, 2024/12/17
- [elpa] externals/speedrect 4eb3b6f58e 14/16: Update NEWS.org, ELPA Syncer, 2024/12/17
- [elpa] externals/speedrect 0897b24ef8 03/16: fill-text: ensure filled rectangles is non-ragged and doesn't move, ELPA Syncer, 2024/12/17
- [elpa] externals/speedrect bc67b6bcfe 15/16: Update README.md, ELPA Syncer, 2024/12/17
- [elpa] externals/speedrect 822a77e867 01/16: README: add demo movie and new screenshot, ELPA Syncer, 2024/12/17
- [elpa] externals/speedrect f52088fd72 05/16: recall-last: turn on rectangle mark mode if not already on, ELPA Syncer, 2024/12/17
- [elpa] externals/speedrect 1735612384 06/16: quit: stash rectangle prior to quitting, ELPA Syncer, 2024/12/17
- [elpa] externals/speedrect 2f46cbec96 07/16: multiple-cursors: recall last rectangle rect when completed,
ELPA Syncer <=
- [elpa] externals/speedrect 622df66aab 08/16: NEWS: update for v0.7, ELPA Syncer, 2024/12/17
- [elpa] externals/speedrect 2232149c30 09/16: Bumped version, ELPA Syncer, 2024/12/17
- [elpa] externals/speedrect 606898521a 12/16: Update README.md, ELPA Syncer, 2024/12/17
- [elpa] externals/speedrect 1c595296af 13/16: Update README.md, ELPA Syncer, 2024/12/17
- [elpa] externals/speedrect 3f6057bc32 10/16: Update README.md, ELPA Syncer, 2024/12/17
- [elpa] externals/speedrect c6e5e1fe7e 16/16: Update README.md, ELPA Syncer, 2024/12/17