aboutsummaryrefslogtreecommitdiff
path: root/runtime/lua/vim
diff options
context:
space:
mode:
authorYorick Peterse <yorick@yorickpeterse.com>2024-12-23 20:57:15 +0100
committerGitHub <noreply@github.com>2024-12-23 11:57:15 -0800
commit4cbeb6fa3cc764fd5605bccf7362f7a249d6df81 (patch)
tree7f0fe1a0129f976bcb53e0ab782bb73b311eb750 /runtime/lua/vim
parentffaab09e998678ba2309821300ac10d62f3d3a78 (diff)
downloadrneovim-4cbeb6fa3cc764fd5605bccf7362f7a249d6df81.tar.gz
rneovim-4cbeb6fa3cc764fd5605bccf7362f7a249d6df81.tar.bz2
rneovim-4cbeb6fa3cc764fd5605bccf7362f7a249d6df81.zip
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.
Diffstat (limited to 'runtime/lua/vim')
-rw-r--r--runtime/lua/vim/diagnostic.lua2
1 files changed, 1 insertions, 1 deletions
diff --git a/runtime/lua/vim/diagnostic.lua b/runtime/lua/vim/diagnostic.lua
index 39ef18e0b4..90f967fe79 100644
--- a/runtime/lua/vim/diagnostic.lua
+++ b/runtime/lua/vim/diagnostic.lua
@@ -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')