mirror of
https://github.com/neovim/neovim.git
synced 2025-02-25 18:55:25 -06:00
fix(treesitter): validate window before updating preview highlights
This commit is contained in:
parent
fec51229c4
commit
2bf3e82676
@ -560,7 +560,9 @@ function M.preview_query()
|
|||||||
buffer = query_buf,
|
buffer = query_buf,
|
||||||
desc = 'Update query previewer highlights when the cursor moves',
|
desc = 'Update query previewer highlights when the cursor moves',
|
||||||
callback = function()
|
callback = function()
|
||||||
update_preview_highlights(query_win, win)
|
if api.nvim_win_is_valid(win) then
|
||||||
|
update_preview_highlights(query_win, win)
|
||||||
|
end
|
||||||
end,
|
end,
|
||||||
})
|
})
|
||||||
api.nvim_create_autocmd('BufLeave', {
|
api.nvim_create_autocmd('BufLeave', {
|
||||||
|
Loading…
Reference in New Issue
Block a user