diff --git a/16669.patch b/16669.patch index cb033a6..3cd7e23 100644 --- a/16669.patch +++ b/16669.patch @@ -1,5 +1,5 @@ diff --git a/runtime/lua/vim/lsp/sync.lua b/runtime/lua/vim/lsp/sync.lua -index 5df2a4d144d2..8d08d2763bdc 100644 +index 5df2a4d144d2..c745fadf876e 100644 --- a/runtime/lua/vim/lsp/sync.lua +++ b/runtime/lua/vim/lsp/sync.lua @@ -93,30 +93,38 @@ end @@ -11,7 +11,7 @@ index 5df2a4d144d2..8d08d2763bdc 100644 ---@returns table byte_idx and char_idx of first change position -local function align_end_position(line, byte, offset_encoding) +local function align_position(line, byte, start, offset_encoding) -+ if byte <= #line then ++ if byte ~= 1 and byte <= #line then + -- Modifying line, find the nearest utf codepoint + local offset = str_utf_start(line, byte) +