From 52a6f348874778cf315b47d9e8b5f818f4b97277 Mon Sep 17 00:00:00 2001 From: zeertzjq Date: Wed, 22 May 2024 16:42:44 +0200 Subject: 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 Signed-off-by: Christian Brabandt --- runtime/doc/builtin.txt | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'runtime') diff --git a/runtime/doc/builtin.txt b/runtime/doc/builtin.txt index b9dd4d20bf..4177a01811 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 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 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")) -- cgit v1.2.3