mirror of
https://github.com/neovim/neovim.git
synced 2024-12-19 10:45:16 -07: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,
|
||||
desc = 'Update query previewer highlights when the cursor moves',
|
||||
callback = function()
|
||||
update_preview_highlights(query_win, win)
|
||||
if api.nvim_win_is_valid(win) then
|
||||
update_preview_highlights(query_win, win)
|
||||
end
|
||||
end,
|
||||
})
|
||||
api.nvim_create_autocmd('BufLeave', {
|
||||
|
Loading…
Reference in New Issue
Block a user