mirror of
https://github.com/neovim/neovim.git
synced 2025-09-06 19:38:20 +00:00
fix(lsp): handle adjacent snippet tabstops
This commit is contained in:

committed by
Lewis Russell

parent
43661a0abf
commit
0e9a33572d
@@ -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('<Tab>')
|
||||
poke_eventloop()
|
||||
feed(',2')
|
||||
eq({ 'for i=1,10,2 do', '\t', 'end' }, buf_lines(0))
|
||||
end)
|
||||
end)
|
||||
|
Reference in New Issue
Block a user