mirror of
https://github.com/neovim/neovim.git
synced 2024-12-26 14:11:15 -07:00
fix(diagnostic): silence :chistory #31701
vim.diagnostic.set_list() uses chistory to restore the actively selected entry whenever necessary. This however also results in it displaying some output in the message bar, but this output isn't useful (and can even be distracting) when opening the quickfix window. This fixes this by silencing the chistory command.
This commit is contained in:
parent
ffaab09e99
commit
4cbeb6fa3c
@ -874,7 +874,7 @@ local function set_list(loclist, opts)
|
||||
if not loclist then
|
||||
-- First navigate to the diagnostics quickfix list.
|
||||
local nr = vim.fn.getqflist({ id = qf_id, nr = 0 }).nr
|
||||
api.nvim_command(nr .. 'chistory')
|
||||
api.nvim_command(('silent %dchistory'):format(nr))
|
||||
|
||||
-- Now open the quickfix list.
|
||||
api.nvim_command('botright cwindow')
|
||||
|
Loading…
Reference in New Issue
Block a user