diff options
-rw-r--r-- | server/src/core/completion.lua | 4 | ||||
-rw-r--r-- | server/test/completion/init.lua | 12 |
2 files changed, 8 insertions, 8 deletions
diff --git a/server/src/core/completion.lua b/server/src/core/completion.lua index 1fd0516f..d02897c7 100644 --- a/server/src/core/completion.lua +++ b/server/src/core/completion.lua @@ -487,9 +487,9 @@ local function searchSpecial(vm, source, word, callback, pos) local label = table.concat(chars) .. '+1' callback(label, nil, CompletionItemKind.Snippet, { textEdit = { - start = index.start, + start = inside.start + 1, finish = index.finish, - newText = ('[#%s] = '):format(label), + newText = ('%s] = '):format(label), }, }) end diff --git a/server/test/completion/init.lua b/server/test/completion/init.lua index 5b3cf678..59189921 100644 --- a/server/test/completion/init.lua +++ b/server/test/completion/init.lua @@ -528,9 +528,9 @@ self.results.list[#@] label = 'self.results.list+1', kind = CompletionItemKind.Snippet, textEdit = { - start = 18, + start = 20, finish = 21, - newText = '[#self.results.list+1] = ', + newText = 'self.results.list+1] = ', }, }, } @@ -543,9 +543,9 @@ self.results.list[#self.re@] label = 'self.results.list+1', kind = CompletionItemKind.Snippet, textEdit = { - start = 18, + start = 20, finish = 28, - newText = '[#self.results.list+1] = ', + newText = 'self.results.list+1] = ', }, }, { @@ -562,9 +562,9 @@ fff[#ff@] label = 'fff+1', kind = CompletionItemKind.Snippet, textEdit = { - start = 4, + start = 6, finish = 9, - newText = '[#fff+1] = ', + newText = 'fff+1] = ', }, }, { |