From 25b53b593ef6f229fbec5b3dc205a7539579d13a Mon Sep 17 00:00:00 2001 From: Tristan Knight Date: Sat, 26 Oct 2024 15:38:25 +0100 Subject: 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) --- test/functional/plugin/lsp/diagnostic_spec.lua | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'test/functional/plugin/lsp/diagnostic_spec.lua') diff --git a/test/functional/plugin/lsp/diagnostic_spec.lua b/test/functional/plugin/lsp/diagnostic_spec.lua index 78c684083b..b7e292cad0 100644 --- a/test/functional/plugin/lsp/diagnostic_spec.lua +++ b/test/functional/plugin/lsp/diagnostic_spec.lua @@ -219,13 +219,13 @@ describe('vim.lsp.diagnostic', function() eq(1, #result) eq( exec_lua(function() - return vim.str_byteindex(line, 7, true) + return vim.str_byteindex(line, 'utf-16', 7) end), result[1].col ) eq( exec_lua(function() - return vim.str_byteindex(line, 8, true) + return vim.str_byteindex(line, 'utf-16', 8) end), result[1].end_col ) -- cgit