fix(snippet): sync tabstop text also if pmenu is visible (#35250)

Using a snippet like:

    ${1:name} :: ${2}\n${1:name} ${3}= ${4:undefined}${0}

The text for `${1:name}` stopped syncing if the completion popup menu
showed up. E.g. typing `par` where the `a` triggered completion resulted
in:

    pat ::
    pa = undefined

Instead of:

    pat ::
    pat = undefined
This commit is contained in:
Mathias Fußenegger
2025-08-09 03:56:54 +02:00
committed by GitHub
parent fa92a0b9fe
commit 1968029003

View File

@@ -375,7 +375,7 @@ local function setup_autocmds(bufnr)
end,
})
vim.api.nvim_create_autocmd({ 'TextChanged', 'TextChangedI' }, {
vim.api.nvim_create_autocmd({ 'TextChanged', 'TextChangedI', 'TextChangedP' }, {
group = snippet_group,
desc = 'Update active tabstops when buffer text changes',
buffer = bufnr,