aboutsummaryrefslogtreecommitdiff
path: root/evil-vars.el
diff options
context:
space:
mode:
authorTom Dalziel <tom_dl@hotmail.com>2022-04-22 23:31:23 +0100
committerTom Dalziel <33435574+tomdl89@users.noreply.github.com>2022-04-30 20:58:00 +0200
commit87997ec3cfaa475475216dcc37fc38a2301c8ea4 (patch)
tree125b32477b10e1049bf377a10f48fefe5898a315 /evil-vars.el
parent008a6cdb12f15e748979a7d1c2f26c34c84dedbf (diff)
Add `evil-v$-excludes-newline`
Deprecate `evil-want-visual-char-semi-exclusive`. Fixes #897
Diffstat (limited to 'evil-vars.el')
-rw-r--r--evil-vars.el18
1 files changed, 17 insertions, 1 deletions
diff --git a/evil-vars.el b/evil-vars.el
index 7f765e0..3b1635e 100644
--- a/evil-vars.el
+++ b/evil-vars.el
@@ -1081,7 +1081,10 @@ These commands work better without this newline."
:initialize 'evil-custom-initialize-pending-reset)
(defcustom evil-want-visual-char-semi-exclusive nil
- "Visual character selection to beginning/end of line is exclusive.
+ "DEPRECATED. Will be removed in a future version.
+Prefer to set `evil-v$-excludes-newline' to non-nil.
+
+Visual character selection to beginning/end of line is exclusive.
If non nil then an inclusive visual character selection which
ends at the beginning or end of a line is turned into an
exclusive selection. Thus if the selected (inclusive) range ends
@@ -1091,6 +1094,19 @@ of a line it is changed to not include the newline character of
that line."
:type 'boolean
:group 'evil)
+(make-obsolete-variable
+ evil-want-visual-char-semi-exclusive
+ "Semi-exclusivity prevents selecting text + 1st char of next line,
+without having to introduce new niche functionality.
+Prefer to set `evil-v$-excludes-newline' to non-nil."
+ "1.15.0")
+
+(defcustom evil-v$-excludes-newline nil
+ "If non-nil, `evil-end-of-line' does not move as far as to include
+the `\n' char at eol. This makes `v$' consistent with `$' used as a
+motion (e.g. `v$y' is consistent with `y$' in normal state)."
+ :type 'boolean
+ :group 'evil)
(defcustom evil-text-object-change-visual-type t
"Text objects change the current visual state type.