[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[nongnu] elpa/multiple-cursors 4c52fb1 358/434: Merge pull request #239
From: |
ELPA Syncer |
Subject: |
[nongnu] elpa/multiple-cursors 4c52fb1 358/434: Merge pull request #239 from ilohmar/dwim-mouse-select |
Date: |
Sat, 7 Aug 2021 09:20:59 -0400 (EDT) |
branch: elpa/multiple-cursors
commit 4c52fb1e560967ff6328fd3abca3025112201c69
Merge: 54c05c3 40eb74e
Author: Magnar Sveen <magnars@gmail.com>
Commit: Magnar Sveen <magnars@gmail.com>
Merge pull request #239 from ilohmar/dwim-mouse-select
Extend mc/add-cursor-on-click to toggle fake cursors
---
mc-mark-more.el | 14 +++++++++++---
1 file changed, 11 insertions(+), 3 deletions(-)
diff --git a/mc-mark-more.el b/mc-mark-more.el
index 68addce..f63887d 100644
--- a/mc-mark-more.el
+++ b/mc-mark-more.el
@@ -576,8 +576,9 @@ If the region is inactive or on a single line, it will
behave like
(<= (point) end))))
;;;###autoload
-(defun mc/add-cursor-on-click (event)
- "Add a cursor where you click."
+(defun mc/toggle-cursor-on-click (event)
+ "Add a cursor where you click, or remove a fake cursor that is
+already there."
(interactive "e")
(mouse-minibuffer-check event)
;; Use event-end in case called from mouse-drag-region.
@@ -589,10 +590,17 @@ If the region is inactive or on a single line, it will
behave like
(if (numberp (posn-point position))
(save-excursion
(goto-char (posn-point position))
- (mc/create-fake-cursor-at-point)))
+ (let ((existing (mc/last-fake-cursor-before (point))))
+ (if (and existing
+ (eq (overlay-get existing 'point) (point)))
+ (mc/remove-fake-cursor existing)
+ (mc/create-fake-cursor-at-point)))))
(mc/maybe-multiple-cursors-mode)))
;;;###autoload
+(defalias 'mc/add-cursor-on-click 'mc/toggle-cursor-on-click)
+
+;;;###autoload
(defun mc/mark-sgml-tag-pair ()
"Mark the tag we're in and its pair for renaming."
(interactive)
- [nongnu] elpa/multiple-cursors a86daa7 270/434: Guard with 'if' rather than defun*/return-from, (continued)
- [nongnu] elpa/multiple-cursors a86daa7 270/434: Guard with 'if' rather than defun*/return-from, ELPA Syncer, 2021/08/07
- [nongnu] elpa/multiple-cursors 18d858f 272/434: Fall straight through in 'mc/mark-all-dwim' if multiple cursors are already active, as that means we can't sensibly edit lines or mark all in region, ELPA Syncer, 2021/08/07
- [nongnu] elpa/multiple-cursors 2b536cb 283/434: Added mc/edit-lines-empty-lines, ELPA Syncer, 2021/08/07
- [nongnu] elpa/multiple-cursors 75ece68 288/434: Merge pull request #118 from aspiers/fix-compile-warnings, ELPA Syncer, 2021/08/07
- [nongnu] elpa/multiple-cursors 9f4502b 304/434: Change file load timing, ELPA Syncer, 2021/08/07
- [nongnu] elpa/multiple-cursors e94567c 303/434: Add installation instructions, ELPA Syncer, 2021/08/07
- [nongnu] elpa/multiple-cursors 98f2346 305/434: Merge pull request #152 from ShingoFukuyama/master, ELPA Syncer, 2021/08/07
- [nongnu] elpa/multiple-cursors 653d523 308/434: Added mc-hide-unmatched-lines mode, ELPA Syncer, 2021/08/07
- [nongnu] elpa/multiple-cursors 3f1611c 345/434: Factor out a superfluous variable, ELPA Syncer, 2021/08/07
- [nongnu] elpa/multiple-cursors 68961b4 355/434: Avoid requiring cl at runtime, ELPA Syncer, 2021/08/07
- [nongnu] elpa/multiple-cursors 4c52fb1 358/434: Merge pull request #239 from ilohmar/dwim-mouse-select,
ELPA Syncer <=
- [nongnu] elpa/multiple-cursors e31b1eb 360/434: Merge pull request #240 from ilohmar/toggle-click-improvements, ELPA Syncer, 2021/08/07
- [nongnu] elpa/multiple-cursors 6a62e60 367/434: Fix issue #131 (#247), ELPA Syncer, 2021/08/07
- [nongnu] elpa/multiple-cursors 2329611 380/434: Merge remote-tracking branch 'upstream/master', ELPA Syncer, 2021/08/07
- [nongnu] elpa/multiple-cursors 60b9ef8 385/434: Updated readme according to `mc/always-run-for-all, ELPA Syncer, 2021/08/07
- [nongnu] elpa/multiple-cursors ad95d28 386/434: Update docstring of `mc/cursor-is-bar`, ELPA Syncer, 2021/08/07
- [nongnu] elpa/multiple-cursors 21e4825 387/434: mc/mark-previous-like-this-word/symbol., ELPA Syncer, 2021/08/07
- [nongnu] elpa/multiple-cursors 95f2e41 391/434: Add @AndreaOrru to list of contributors, ELPA Syncer, 2021/08/07
- [nongnu] elpa/multiple-cursors e14fdb7 401/434: Merge pull request #298 from Quasilyte/update_readme, ELPA Syncer, 2021/08/07
- [nongnu] elpa/multiple-cursors 8172edd 417/434: Realign the file according to Elisp conventions, ELPA Syncer, 2021/08/07
- [nongnu] elpa/multiple-cursors b9b851a 426/434: Merge pull request #358 from renatofdds/master, ELPA Syncer, 2021/08/07