From 01ebc765018039aa2a442ce857e868e7f2850c9c Mon Sep 17 00:00:00 2001 From: Marc Jakobi Date: Wed, 4 Dec 2024 12:23:07 +0100 Subject: [PATCH] fix(`relatedDiagnostics`): compatibility with Nvim 0.10.2 (#605) --- lua/rustaceanvim/commands/diagnostic.lua | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/lua/rustaceanvim/commands/diagnostic.lua b/lua/rustaceanvim/commands/diagnostic.lua index 1342aa3a..fe409a04 100644 --- a/lua/rustaceanvim/commands/diagnostic.lua +++ b/lua/rustaceanvim/commands/diagnostic.lua @@ -459,7 +459,11 @@ function M.related_diagnostics() end) else vim.fn.setqflist({}, ' ', { title = 'related diagnostics', items = quickfix_entries }) - vim.cmd.botright('copen') + if vim.cmd.botright then + vim.cmd.botright('copen') + else + vim.cmd.copen() + end end end