[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[nongnu] elpa/multiple-cursors a9d7764 431/434: Add option to disable ba
From: |
ELPA Syncer |
Subject: |
[nongnu] elpa/multiple-cursors a9d7764 431/434: Add option to disable bar-style fake cursors (#367) |
Date: |
Sat, 7 Aug 2021 09:21:15 -0400 (EDT) |
branch: elpa/multiple-cursors
commit a9d7764f80b241978f3d4e76bc981ef10bab5d70
Author: Zach Kost-Smith <zachkostsmith@gmail.com>
Commit: GitHub <noreply@github.com>
Add option to disable bar-style fake cursors (#367)
---
multiple-cursors-core.el | 16 ++++++++++++++--
1 file changed, 14 insertions(+), 2 deletions(-)
diff --git a/multiple-cursors-core.el b/multiple-cursors-core.el
index 5b6ef5a..6db87a8 100644
--- a/multiple-cursors-core.el
+++ b/multiple-cursors-core.el
@@ -40,6 +40,18 @@
"The face used for fake cursors if the cursor-type is bar"
:group 'multiple-cursors)
+(defcustom mc/match-cursor-style t
+ "If non-nil, attempt to match the cursor style that the user
+has selected. Namely, use vertical bars the user has configured
+Emacs to use that cursor.
+
+If nil, just use standard rectangle cursors for all fake cursors.
+
+In some modes/themes, the bar fake cursors are either not
+rendered or shift text."
+ :type '(boolean)
+ :group 'multiple-cursors)
+
(defface mc/region-face
'((t :inherit region))
"The face used for fake regions"
@@ -125,7 +137,7 @@
(defun mc/make-cursor-overlay-at-eol (pos)
"Create overlay to look like cursor at end of line."
(let ((overlay (make-overlay pos pos nil nil nil)))
- (if (mc/cursor-is-bar)
+ (if (and mc/match-cursor-style (mc/cursor-is-bar))
(overlay-put overlay 'before-string (propertize "|" 'face
'mc/cursor-bar-face))
(overlay-put overlay 'after-string (propertize " " 'face
'mc/cursor-face)))
overlay))
@@ -133,7 +145,7 @@
(defun mc/make-cursor-overlay-inline (pos)
"Create overlay to look like cursor inside text."
(let ((overlay (make-overlay pos (1+ pos) nil nil nil)))
- (if (mc/cursor-is-bar)
+ (if (and mc/match-cursor-style (mc/cursor-is-bar))
(overlay-put overlay 'before-string (propertize "|" 'face
'mc/cursor-bar-face))
(overlay-put overlay 'face 'mc/cursor-face))
overlay))
- [nongnu] elpa/multiple-cursors 3112e61 377/434: When cursor-type is bar, mc/cursors appear as bars, (continued)
- [nongnu] elpa/multiple-cursors 3112e61 377/434: When cursor-type is bar, mc/cursors appear as bars, ELPA Syncer, 2021/08/07
- [nongnu] elpa/multiple-cursors 8413969 383/434: Merge pull request #253 from jtamagnan/fake-bar-cursor, ELPA Syncer, 2021/08/07
- [nongnu] elpa/multiple-cursors ddbe3ae 396/434: Merge pull request #278 from shlomme/master, ELPA Syncer, 2021/08/07
- [nongnu] elpa/multiple-cursors d2766bc 400/434: tips and tricks: add note about <return> and newlines; if it is not default, let it at least be more discoverable, ELPA Syncer, 2021/08/07
- [nongnu] elpa/multiple-cursors 0e49fec 410/434: Merge pull request #326 from pstray/issue325, ELPA Syncer, 2021/08/07
- [nongnu] elpa/multiple-cursors 1075270 407/434: Added mc/interactive-repeating-commands (#303), ELPA Syncer, 2021/08/07
- [nongnu] elpa/multiple-cursors 038815b 414/434: Make "no more matches found." user-error, fix #218, ELPA Syncer, 2021/08/07
- [nongnu] elpa/multiple-cursors d27870d 421/434: Load mc/list-file as late as possible, ELPA Syncer, 2021/08/07
- [nongnu] elpa/multiple-cursors fc6a6a7 422/434: Merge pull request #355 from flatwhatson/lazy-list-file, ELPA Syncer, 2021/08/07
- [nongnu] elpa/multiple-cursors 7763f4f 429/434: Load mc-cycle-cursors and mc-hide-unmatched-lines-mode after loading multiple-cursors-core, ELPA Syncer, 2021/08/07
- [nongnu] elpa/multiple-cursors a9d7764 431/434: Add option to disable bar-style fake cursors (#367),
ELPA Syncer <=
- [nongnu] elpa/multiple-cursors 616fbdd 434/434: Document existing functions in Readme, ELPA Syncer, 2021/08/07
- [nongnu] elpa/multiple-cursors 7ab8a8c 067/434: Better support for undo., ELPA Syncer, 2021/08/07
- [nongnu] elpa/multiple-cursors 608ceb4 069/434: Disable multiple-cursors-mode if there's only one cursor (the real one)., ELPA Syncer, 2021/08/07
- [nongnu] elpa/multiple-cursors 61280ae 100/434: autoload integration for package.el compatibility, ELPA Syncer, 2021/08/07
- [nongnu] elpa/multiple-cursors d82e252 106/434: Don't let fake cursors scroll the buffer, ELPA Syncer, 2021/08/07
- [nongnu] elpa/multiple-cursors dc22766 108/434: Macros must be defined before they are used to be expanded properly, ELPA Syncer, 2021/08/07
- [nongnu] elpa/multiple-cursors 7a655b0 117/434: Disable emacs-snapshot tests until it is in order., ELPA Syncer, 2021/08/07
- [nongnu] elpa/multiple-cursors 067063a 118/434: Split multiline kill-ring entry over cursors when num lines match, ELPA Syncer, 2021/08/07
- [nongnu] elpa/multiple-cursors bdc4d9a 124/434: Add some more commands to default run-once/run-for-all lists., ELPA Syncer, 2021/08/07
- [nongnu] elpa/multiple-cursors 0f54f98 133/434: Bump to 1.1.1 for bugfix, ELPA Syncer, 2021/08/07