Skip to content
This repository has been archived by the owner on Jul 6, 2021. It is now read-only.

Commit

Permalink
revert: changes for location list
Browse files Browse the repository at this point in the history
  • Loading branch information
haorenW1025 committed Sep 16, 2020
1 parent b61d28a commit 9dc00d6
Showing 1 changed file with 2 additions and 5 deletions.
7 changes: 2 additions & 5 deletions lua/diagnostic.lua
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand Down

0 comments on commit 9dc00d6

Please sign in to comment.