From 2c88d6efb87b1f1703c386914bfcb3b81a81b53d Mon Sep 17 00:00:00 2001 From: Gabriel Ebner Date: Wed, 15 Dec 2021 20:36:03 +0100 Subject: [PATCH] Update LSP sync patch. --- 16669.patch | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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) +