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

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

[nongnu] elpa/multiple-cursors fe0d516745: Detect cursor bar type when s


From: ELPA Syncer
Subject: [nongnu] elpa/multiple-cursors fe0d516745: Detect cursor bar type when specified by the frame.
Date: Sat, 26 Nov 2022 02:59:36 -0500 (EST)

branch: elpa/multiple-cursors
commit fe0d5167459b792a699af782685582a195852cb9
Author: Troy Brown <brownts@troybrown.dev>
Commit: Magnar Sveen <magnars@gmail.com>

    Detect cursor bar type when specified by the frame.
    
    When the 'cursor-type' for the buffer is specified by the frame, this
    was not detected by the current logic as 'cursor-type' will be set to
    't' and thus not explicitly match 'bar'.  This update checks to see if
    'cursor-type' is specified by the frame and will pull the parameter
    from the frame if it is, prior to subsequent checks.
---
 multiple-cursors-core.el | 10 +++++++---
 1 file changed, 7 insertions(+), 3 deletions(-)

diff --git a/multiple-cursors-core.el b/multiple-cursors-core.el
index e972bac74a..628663d249 100644
--- a/multiple-cursors-core.el
+++ b/multiple-cursors-core.el
@@ -122,9 +122,13 @@ rendered or shift text."
 
 (defun mc/cursor-is-bar ()
   "Return non-nil if the cursor is a bar."
-  (or (eq cursor-type 'bar)
-    (and (listp cursor-type)
-         (eq (car cursor-type) 'bar))))
+  (let ((cursor-type
+         (if (eq cursor-type t)
+             (frame-parameter nil 'cursor-type)
+           cursor-type)))
+    (or (eq cursor-type 'bar)
+        (and (listp cursor-type)
+             (eq (car cursor-type) 'bar)))))
 
 (defun mc/line-number-at-pos (&optional pos absolute)
   "Faster implementation of `line-number-at-pos'."



reply via email to

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