mirror of
https://github.com/neovim/neovim
synced 2025-07-15 16:51:49 +00:00
vim-patch:bfeefc4: runtime(doc): clarify the effect of exclusive single char selections (#34289)
closes: vim/vim#17410bfeefc474a
Co-authored-by: Christian Brabandt <cb@256bit.org> (cherry picked from commitaa4fa24963
)
This commit is contained in:
committed by
github-actions[bot]
parent
0d66963089
commit
222b3d5021
@ -5010,9 +5010,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).
|
||||
|
||||
*'selectmode'* *'slm'*
|
||||
'selectmode' 'slm' string (default "")
|
||||
|
@ -4093,6 +4093,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: >vim
|
||||
xnoremap <CR>
|
||||
|
11
runtime/lua/vim/_meta/options.lua
generated
11
runtime/lua/vim/_meta/options.lua
generated
@ -5248,9 +5248,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"
|
||||
|
4
runtime/lua/vim/_meta/vimfn.lua
generated
4
runtime/lua/vim/_meta/vimfn.lua
generated
@ -3692,6 +3692,10 @@ function vim.fn.getreginfo(regname) end
|
||||
--- - 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 <CR>
|
||||
|
@ -4578,6 +4578,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 <CR>
|
||||
|
@ -7027,9 +7027,14 @@ local options = {
|
||||
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).
|
||||
]=],
|
||||
full_name = 'selection',
|
||||
scope = { 'global' },
|
||||
|
Reference in New Issue
Block a user