refactor(lsp): drop str_byteindex/str_utfindex wrappers #30915

* deprecate old signatures
* move to new str_byteindex/str_utfindex signature
* use single-underscore name (double-underscore is reserved for Lua itself)
This commit is contained in:
Tristan Knight
2024-10-26 15:38:25 +01:00
committed by GitHub
parent b922b7d6d7
commit 25b53b593e
12 changed files with 54 additions and 176 deletions

View File

@ -315,7 +315,7 @@ local function adjust_start_col(lnum, line, items, encoding)
end
end
if min_start_char then
return lsp.util._str_byteindex_enc(line, min_start_char, encoding)
return vim.str_byteindex(line, encoding, min_start_char, false)
else
return nil
end