From aa4fa2496387c962ee8b4cbd7720396ec7596dbd Mon Sep 17 00:00:00 2001 From: zeertzjq Date: Tue, 3 Jun 2025 07:54:29 +0800 Subject: 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 --- src/nvim/eval.lua | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'src/nvim/eval.lua') diff --git a/src/nvim/eval.lua b/src/nvim/eval.lua index 534ae610d4..7b2eda67aa 100644 --- a/src/nvim/eval.lua +++ b/src/nvim/eval.lua @@ -4660,6 +4660,10 @@ M.funcs = { - It is evaluated in current window context, which makes a difference if the buffer is displayed in a window with different 'virtualedit' or 'list' values. + - When specifying an exclusive selection and {pos1} and {pos2} + are equal, the returned list contains a single character as + if selection is inclusive, to match the behavior of an empty + exclusive selection in Visual mode. Examples: >vim xnoremap -- cgit