From 0e9a33572dc752463a0f5ad8a08a2c494d7a42e1 Mon Sep 17 00:00:00 2001 From: Maria José Solano Date: Wed, 3 Jan 2024 20:05:03 -0800 Subject: fix(lsp): handle adjacent snippet tabstops --- test/functional/lua/snippet_spec.lua | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'test/functional/lua') diff --git a/test/functional/lua/snippet_spec.lua b/test/functional/lua/snippet_spec.lua index f86d73a82b..6f76f46e75 100644 --- a/test/functional/lua/snippet_spec.lua +++ b/test/functional/lua/snippet_spec.lua @@ -216,4 +216,16 @@ describe('vim.snippet', function() feed('foo') eq({ 'public function foo() {', '\t', '}' }, buf_lines(0)) end) + + it('jumps through adjacent tabstops', function() + test_expand_success( + { 'for i=1,${1:to}${2:,step} do\n\t$3\nend' }, + { 'for i=1,to,step do', '\t', 'end' } + ) + feed('10') + feed('') + poke_eventloop() + feed(',2') + eq({ 'for i=1,10,2 do', '\t', 'end' }, buf_lines(0)) + end) end) -- cgit