From 9dc00d68fd15768c9562fe4a63d584eece389e28 Mon Sep 17 00:00:00 2001 From: haorenW1025 Date: Wed, 16 Sep 2020 14:59:35 +0800 Subject: [PATCH] revert: changes for location list --- lua/diagnostic.lua | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/lua/diagnostic.lua b/lua/diagnostic.lua index 85a6ab6..5d813c5 100644 --- a/lua/diagnostic.lua +++ b/lua/diagnostic.lua @@ -86,11 +86,8 @@ function M.publish_diagnostics(bufnr) if vim.api.nvim_get_var('diagnostic_enable_virtual_text') == 1 then util.buf_diagnostics_virtual_text(bufnr, diagnostics) end - if #vim.fn.getloclist(vim.fn.winnr()) == 0 then - vim.fn.setloclist(0, {}, 'r') - M.diagnostics_loclist(diagnostics) - end - M.trigger_diagnostics_changed() + vim.fn.setloclist(0, {}, 'r') + M.diagnostics_loclist(diagnostics) end M.trigger_diagnostics_changed = vim.schedule_wrap(function()