summaryrefslogtreecommitdiffstatshomepage
path: root/runtime/lua/vim/_meta/options.lua
diff options
context:
space:
mode:
authorzeertzjq <zeertzjq@outlook.com>2025-06-03 07:54:29 +0800
committerGitHub <noreply@github.com>2025-06-02 23:54:29 +0000
commitaa4fa2496387c962ee8b4cbd7720396ec7596dbd (patch)
tree820d3dd0a4f55c1ccc22aca0fa25fdb14e40476d /runtime/lua/vim/_meta/options.lua
parent9c9c7ae30f50685e62984084767905c7d456cdd9 (diff)
vim-patch:bfeefc4: runtime(doc): clarify the effect of exclusive single char selections (#34289)
closes: vim/vim#17410 https://github.com/vim/vim/commit/bfeefc474a3ed25852491a93e1e5610774f4de8c Co-authored-by: Christian Brabandt <cb@256bit.org>
Diffstat (limited to 'runtime/lua/vim/_meta/options.lua')
-rw-r--r--runtime/lua/vim/_meta/options.lua11
1 files changed, 8 insertions, 3 deletions
diff --git a/runtime/lua/vim/_meta/options.lua b/runtime/lua/vim/_meta/options.lua
index b04d484e6c..957e8f9438 100644
--- a/runtime/lua/vim/_meta/options.lua
+++ b/runtime/lua/vim/_meta/options.lua
@@ -5414,9 +5414,14 @@ vim.go.sect = vim.go.sections
--- the end of line the line break still isn't included.
--- When "exclusive" is used, cursor position in visual mode will be
--- adjusted for inclusive motions `inclusive-motion-selection-exclusive`.
---- Note that when "exclusive" is used and selecting from the end
---- backwards, you cannot include the last character of a line, when
---- starting in Normal mode and 'virtualedit' empty.
+---
+--- Note:
+--- - When "exclusive" is used and selecting from the end backwards, you
+--- cannot include the last character of a line, when starting in Normal
+--- mode and 'virtualedit' empty.
+--- - when "exclusive" is used with a single character visual selection,
+--- Vim will behave as if the 'selection' is inclusive (in other words,
+--- you cannot visually select an empty region).
---
--- @type 'inclusive'|'exclusive'|'old'
vim.o.selection = "inclusive"