forked from aniani/vim
patch 9.1.0430: getregionpos() doesn't handle one char selection
Problem: getregionpos() doesn't handle one char selection.
Solution: Handle startspaces differently when is_oneChar is set.
Also add a test for an exclusive charwise selection with
multibyte chars (zeertzjq)
closes: #14825
Signed-off-by: zeertzjq <zeertzjq@outlook.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
This commit is contained in:
committed by
Christian Brabandt
parent
95ff39f8e3
commit
52a6f34887
@@ -1,4 +1,4 @@
|
||||
*builtin.txt* For Vim version 9.1. Last change: 2024 May 20
|
||||
*builtin.txt* For Vim version 9.1. Last change: 2024 May 22
|
||||
|
||||
|
||||
VIM REFERENCE MANUAL by Bram Moolenaar
|
||||
@@ -4345,8 +4345,8 @@ getregionpos({pos1}, {pos2} [, {opts}]) *getregionpos()*
|
||||
the offset in screen columns from the start of the character.
|
||||
E.g., a position within a <Tab> or after the last character.
|
||||
If the "off" number of an ending position is non-zero, it is
|
||||
the character's number of cells included in the selection,
|
||||
otherwise the whole character is included.
|
||||
the offset of the character's first cell not included in the
|
||||
selection, otherwise all its cells are included.
|
||||
|
||||
Can also be used as a |method|: >
|
||||
getpos('.')->getregionpos(getpos("'a"))
|
||||
|
||||
Reference in New Issue
Block a user