From d89c7db0c2c5a561cb7bf00f0b0549ee2ce2d669 Mon Sep 17 00:00:00 2001 From: Steve Vermeulen Date: Sun, 12 Jul 2020 20:08:14 -0700 Subject: [PATCH] Changed to ignore publishDiagnostic updates for windows other than the current one --- lua/diagnostic.lua | 3 +++ 1 file changed, 3 insertions(+) diff --git a/lua/diagnostic.lua b/lua/diagnostic.lua index b5d87aa..602e28f 100644 --- a/lua/diagnostic.lua +++ b/lua/diagnostic.lua @@ -44,6 +44,9 @@ function M.modifyCallback() vim.lsp.err_message("LSP.publishDiagnostics: Couldn't find buffer for ", uri) return end + if vim.api.nvim_win_get_buf(vim.api.nvim_get_current_win()) ~= bufnr then + return + end get_diagnostics_count(result.diagnostics, bufnr) if vim.api.nvim_get_var('diagnostic_level') ~= nil then result.diagnostics = remove_diagnostics(result.diagnostics)