summaryrefslogtreecommitdiffstats
path: root/runtime/doc/builtin.txt
diff options
context:
space:
mode:
authorzeertzjq <zeertzjq@outlook.com>2024-05-20 14:00:31 +0200
committerChristian Brabandt <cb@256bit.org>2024-05-20 14:00:31 +0200
commitc95e64f41f7f6d1bdc95b047ae9b369743c8637b (patch)
tree1d65603d5a4dee278f40c0c241057c113885578b /runtime/doc/builtin.txt
parent22029edb6c7b2cb146668354daad60bfe59eaac1 (diff)
patch 9.1.0423: getregionpos() wrong with blockwise mode and multibytev9.1.0423
Problem: getregionpos() wrong with blockwise mode and multibyte. Solution: Use textcol and textlen instead of start_vcol and end_vcol. Handle coladd properly (zeertzjq). Also remove unnecessary buflist_findnr() in add_regionpos_range(), as getregionpos() has already switched buffer. closes: #14805 Signed-off-by: zeertzjq <zeertzjq@outlook.com> Signed-off-by: Christian Brabandt <cb@256bit.org>
Diffstat (limited to 'runtime/doc/builtin.txt')
-rw-r--r--runtime/doc/builtin.txt12
1 files changed, 7 insertions, 5 deletions
diff --git a/runtime/doc/builtin.txt b/runtime/doc/builtin.txt
index 46819d6b9f..b9dd4d20bf 100644
--- a/runtime/doc/builtin.txt
+++ b/runtime/doc/builtin.txt
@@ -1,4 +1,4 @@
-*builtin.txt* For Vim version 9.1. Last change: 2024 May 18
+*builtin.txt* For Vim version 9.1. Last change: 2024 May 20
VIM REFERENCE MANUAL by Bram Moolenaar
@@ -4341,10 +4341,12 @@ getregionpos({pos1}, {pos2} [, {opts}]) *getregionpos()*
"bufnum" is the buffer number.
"lnum" and "col" are the position in the buffer. The first
column is 1.
- The "off" number is zero, unless 'virtualedit' is used. Then
- it is 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 a starting position is non-zero, it is
+ 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.
Can also be used as a |method|: >
getpos('.')->getregionpos(getpos("'a"))