Skip to content

Commit

Permalink
(feat): Clear the qflist when errors are resolved and tsc is reran
Browse files Browse the repository at this point in the history
  • Loading branch information
dmmulroy authored Apr 27, 2023
1 parent a40b3d9 commit eb31e93
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions lua/tsc/init.lua
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ local options = {
spinner = { "", "", "", "", "", "", "", "" },
}

local function open_qf_list(errors)
local function set_qf_list(errors)
vim.fn.setqflist({}, "r", { title = "TSC", items = errors })

if #errors > 0 then
Expand Down Expand Up @@ -121,9 +121,7 @@ M.run = function()
errors = result.errors
files_with_errors = result.files

if #errors > 0 then
open_qf_list(errors)
end
set_qf_list(errors)
end

local on_exit = function()
Expand Down

0 comments on commit eb31e93

Please sign in to comment.