mirror of
https://github.com/neovim/neovim
synced 2025-07-16 09:11:51 +00:00
fix(snippet): cancel snippet session when leaving the buffer (#29031)
This commit is contained in:
committed by
GitHub
parent
292365fa1b
commit
608543f8a9
@ -395,6 +395,15 @@ local function setup_autocmds(bufnr)
|
|||||||
end
|
end
|
||||||
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
|
end
|
||||||
|
|
||||||
--- Expands the given snippet text.
|
--- Expands the given snippet text.
|
||||||
|
Reference in New Issue
Block a user