runtime(doc): clarify the effect of exclusive single char selections

Commit: 
https://github.com/vim/vim/commit/bfeefc474a3ed25852491a93e1e5610774f4de8c
Author: Christian Brabandt <c...@256bit.org>
Date:   Mon Jun 2 19:56:57 2025 +0200

    runtime(doc): clarify the effect of exclusive single char selections
    
    closes: https://github.com/vim/vim/issues/17410
    
    Co-authored-by: zeertzjq <zeert...@outlook.com>
    Signed-off-by: Christian Brabandt <c...@256bit.org>

diff --git a/runtime/doc/builtin.txt b/runtime/doc/builtin.txt
index 8cce98a3f..3105a3d7d 100644
--- a/runtime/doc/builtin.txt
+++ b/runtime/doc/builtin.txt
@@ -1,4 +1,4 @@
-*builtin.txt*  For Vim version 9.1.  Last change: 2025 Jun 01
+*builtin.txt*  For Vim version 9.1.  Last change: 2025 Jun 02
 
 
                  VIM REFERENCE MANUAL    by Bram Moolenaar
@@ -5042,6 +5042,10 @@ getregion({pos1}, {pos2} [, {opts}])                     
*getregion()*
                - 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: >
                        :xnoremap <CR>
diff --git a/runtime/doc/options.txt b/runtime/doc/options.txt
index cc0a5e652..5c6fbfbef 100644
--- a/runtime/doc/options.txt
+++ b/runtime/doc/options.txt
@@ -1,4 +1,4 @@
-*options.txt*  For Vim version 9.1.  Last change: 2025 Jun 01
+*options.txt*  For Vim version 9.1.  Last change: 2025 Jun 02
 
 
                  VIM REFERENCE MANUAL    by Bram Moolenaar
@@ -7199,9 +7199,14 @@ A jump table for the options with a short description 
can be found at |Q_op|.
        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).
 
        The 'selection' option is set by the |:behave| command.
 

-- 
-- 
You received this message from the "vim_dev" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

--- 
You received this message because you are subscribed to the Google Groups 
"vim_dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to vim_dev+unsubscr...@googlegroups.com.
To view this discussion visit 
https://groups.google.com/d/msgid/vim_dev/E1uM9SB-00DXkt-B6%40256bit.org.

Raspunde prin e-mail lui