aboutsummaryrefslogtreecommitdiff
path: root/test/functional/lua/snippet_spec.lua
diff options
context:
space:
mode:
authorMaria José Solano <majosolano99@gmail.com>2023-10-25 22:29:05 -0700
committerGitHub <noreply@github.com>2023-10-26 07:29:05 +0200
commit15983cf2c64c527fc13681925d0d00c070c30640 (patch)
tree83430e425fc9bbac5e36dd396909cde85822330d /test/functional/lua/snippet_spec.lua
parent9de157bce4b6eb055a0d7a39d1ed6b7a6e6c6545 (diff)
downloadrneovim-15983cf2c64c527fc13681925d0d00c070c30640.tar.gz
rneovim-15983cf2c64c527fc13681925d0d00c070c30640.tar.bz2
rneovim-15983cf2c64c527fc13681925d0d00c070c30640.zip
fix(lsp): cancel session when leaving snippet region (#25762)
Diffstat (limited to 'test/functional/lua/snippet_spec.lua')
-rw-r--r--test/functional/lua/snippet_spec.lua7
1 files changed, 7 insertions, 0 deletions
diff --git a/test/functional/lua/snippet_spec.lua b/test/functional/lua/snippet_spec.lua
index 738420d87d..390f268925 100644
--- a/test/functional/lua/snippet_spec.lua
+++ b/test/functional/lua/snippet_spec.lua
@@ -164,4 +164,11 @@ describe('vim.snippet', function()
feed('<esc>Vjjd')
eq(false, exec_lua('return vim.snippet.active()'))
end)
+
+ it('cancels session when leaving snippet region', function()
+ feed('i<cr>')
+ test_success({ 'local function $1()', ' $0', 'end' }, { '', 'local function ()', ' ', 'end' })
+ feed('<esc>k')
+ eq(false, exec_lua('return vim.snippet.active()'))
+ end)
end)