branch: externals/objed
commit 89e1e1840a9838557bcc266ba9f20e998062ac1c
Author: Clemens Radermacher <[email protected]>
Commit: Clemens Radermacher <[email protected]>
Also activate mc if only one fake cursor
---
objed.el | 7 +++++--
1 file changed, 5 insertions(+), 2 deletions(-)
diff --git a/objed.el b/objed.el
index 30d16ab..c6cf713 100644
--- a/objed.el
+++ b/objed.el
@@ -393,6 +393,7 @@ To avoid loading `avy' set this var before activating
`objed-mode.'"
(declare-function hl-line-unhighlight "ext:hl-line")
(declare-function hl-line-highlight "ext:hl-line")
(declare-function mc/create-fake-cursor-at-point "ext:multiple-cursors")
+(declare-function mc/num-cursors "ext:multiple-cursors")
@@ -3454,8 +3455,10 @@ and RANGE hold the object position data."
(cond ((eq 'keep exit)
(ignore))
((eq 'mc exit)
- (when (fboundp 'mc/maybe-multiple-cursors-mode)
- (mc/maybe-multiple-cursors-mode))
+ (when (fboundp 'multiple-cursors-mode)
+ (if (> (mc/num-cursors) 0)
+ (multiple-cursors-mode 1)
+ (multiple-cursors-mode 0)))
(objed--exit-objed))
((eq 'current exit)
;; use the markers for updated object