From 5cbd6d9b9f232a6ff22ae3a9af80075404226e4b Mon Sep 17 00:00:00 2001 From: zeertzjq Date: Thu, 23 May 2024 06:08:24 +0800 Subject: vim-patch:9.1.0430: getregionpos() doesn't handle one char selection (#28924) 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: vim/vim#14825 https://github.com/vim/vim/commit/52a6f348874778cf315b47d9e8b5f818f4b97277 --- runtime/lua/vim/_meta/vimfn.lua | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'runtime/lua/vim') diff --git a/runtime/lua/vim/_meta/vimfn.lua b/runtime/lua/vim/_meta/vimfn.lua index dee65a40c7..e00b2e6acd 100644 --- a/runtime/lua/vim/_meta/vimfn.lua +++ b/runtime/lua/vim/_meta/vimfn.lua @@ -3596,8 +3596,8 @@ function vim.fn.getregion(pos1, pos2, opts) end --- 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. --- --- @param pos1 table --- @param pos2 table -- cgit