fix(lsp): track snippet deletion

This commit is contained in:
Maria José Solano
2023-10-22 21:21:02 -07:00
committed by Mathias Fußenegger
parent 5e5f5174e3
commit 370232dbef
2 changed files with 51 additions and 29 deletions

View File

@@ -154,4 +154,10 @@ describe('vim.snippet', function()
it('errors with multiple $0 tabstops', function()
test_fail('function $1() { $0 }$0', 'multiple $0 tabstops')
end)
it('cancels session when deleting the snippet', function()
test_success({ 'local function $1()', ' $0', 'end' }, { 'local function ()', ' ', 'end' })
feed('<esc>Vjjd')
eq(false, exec_lua('return vim.snippet.active()'))
end)
end)