File tree 2 files changed +21
-7
lines changed
2 files changed +21
-7
lines changed Original file line number Diff line number Diff line change @@ -3000,13 +3000,14 @@ the positions to be outside of this sequence."
3000
3000
(when (and (numberp beg) (numberp end))
3001
3001
(setq beg-out (min beg end))
3002
3002
(setq end-out (max beg end))
3003
- (let ((comp (find-composition beg-out)))
3004
- ; ; find-composition returns (FROM TO VALID-P)
3005
- (when (and (listp comp) (nth 2 comp))
3006
- (setq beg-out (nth 0 comp))))
3007
- (let ((comp (find-composition end-out)))
3008
- (when (and (listp comp) (nth 2 comp))
3009
- (setq end-out (nth 1 comp))))
3003
+ (when evil-want-treat-composed-chars-as-one
3004
+ (let ((comp (find-composition beg-out)))
3005
+ ; ; find-composition returns (FROM TO VALID-P)
3006
+ (when (and (listp comp) (nth 2 comp))
3007
+ (setq beg-out (nth 0 comp))))
3008
+ (let ((comp (find-composition end-out)))
3009
+ (when (and (listp comp) (nth 2 comp))
3010
+ (setq end-out (nth 1 comp)))))
3010
3011
(append (list beg-out end-out)
3011
3012
(when (evil-type-p type)
3012
3013
(list type))
Original file line number Diff line number Diff line change @@ -1104,6 +1104,19 @@ without having to introduce new niche functionality.
1104
1104
Prefer to set `evil-v$-excludes-newline' to non-nil."
1105
1105
" 1.15.0" )
1106
1106
1107
+ (defcustom evil-want-treat-composed-chars-as-one nil
1108
+ " EXPERIMENTAL. Treat composed characters as single characters.
1109
+
1110
+ Composed characters are sequences of characters in the buffer
1111
+ that are displayed as a single glyph. This is the device used by
1112
+ `prettify-symbols-mode' among others. This option tells evil that
1113
+ these sequences of characters should be treated as a single unit
1114
+ to, for example, prevent part of the sequence from being deleted
1115
+ by an evil command. It alters low-level functionality of evil and
1116
+ is considered experimental."
1117
+ :type 'boolean
1118
+ :group 'evil )
1119
+
1107
1120
(defcustom evil-v$-excludes-newline nil
1108
1121
" If non-nil, `evil-end-of-line' does not move as far as to include
1109
1122
the `\n' char at eol. This makes `v$' consistent with `$' used as a
You can’t perform that action at this time.
0 commit comments