From 370232dbefb91b7ee773ee9a61a9b1ad77d7f1af Mon Sep 17 00:00:00 2001 From: Maria José Solano Date: Sun, 22 Oct 2023 21:21:02 -0700 Subject: fix(lsp): track snippet deletion --- test/functional/lua/snippet_spec.lua | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'test/functional/lua/snippet_spec.lua') diff --git a/test/functional/lua/snippet_spec.lua b/test/functional/lua/snippet_spec.lua index 1ae1bc71d5..fea9d1e982 100644 --- a/test/functional/lua/snippet_spec.lua +++ b/test/functional/lua/snippet_spec.lua @@ -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('Vjjd') + eq(false, exec_lua('return vim.snippet.active()')) + end) end) -- cgit