mirror of
https://github.com/neovim/neovim.git
synced 2024-12-20 11:15:14 -07:00
fix(snippet): cancel snippet session when leaving the buffer (#29044)
(cherry picked from commit 608543f8a9
)
Co-authored-by: Maria José Solano <majosolano99@gmail.com>
This commit is contained in:
parent
e98637e8c0
commit
039121f5a3
@ -395,6 +395,15 @@ local function setup_autocmds(bufnr)
|
||||
end
|
||||
end,
|
||||
})
|
||||
|
||||
vim.api.nvim_create_autocmd('BufLeave', {
|
||||
group = snippet_group,
|
||||
desc = 'Stop the snippet session when leaving the buffer',
|
||||
buffer = bufnr,
|
||||
callback = function()
|
||||
M.stop()
|
||||
end,
|
||||
})
|
||||
end
|
||||
|
||||
--- Expands the given snippet text.
|
||||
|
Loading…
Reference in New Issue
Block a user