chore(diagnostics): move updates to renderer (#1218)
should address #1216
This commit is contained in:
parent
97d8557cb2
commit
db873b340d
@ -3,7 +3,6 @@ local a = vim.api
|
||||
local log = require "nvim-tree.log"
|
||||
local utils = require "nvim-tree.utils"
|
||||
local core = require "nvim-tree.core"
|
||||
local diagnostics = require "nvim-tree.diagnostics"
|
||||
|
||||
local M = {
|
||||
current_tab = a.nvim_get_current_tabpage(),
|
||||
@ -42,7 +41,6 @@ function M.force_dirchange(foldername, with_open)
|
||||
else
|
||||
require("nvim-tree.renderer").draw()
|
||||
end
|
||||
diagnostics.update()
|
||||
|
||||
log.profile_end(ps, "change dir %s", foldername)
|
||||
end
|
||||
|
||||
@ -1,7 +1,6 @@
|
||||
local renderer = require "nvim-tree.renderer"
|
||||
local utils = require "nvim-tree.utils"
|
||||
local core = require "nvim-tree.core"
|
||||
local diagnostics = require "nvim-tree.diagnostics"
|
||||
|
||||
local M = {}
|
||||
|
||||
@ -39,7 +38,6 @@ function M.fn(keep_buffers)
|
||||
|
||||
iter(core.get_explorer().nodes)
|
||||
renderer.draw()
|
||||
diagnostics.update()
|
||||
end
|
||||
|
||||
return M
|
||||
|
||||
@ -1,6 +1,5 @@
|
||||
local utils = require "nvim-tree.utils"
|
||||
local view = require "nvim-tree.view"
|
||||
local diagnostics = require "nvim-tree.diagnostics"
|
||||
local renderer = require "nvim-tree.renderer"
|
||||
local core = require "nvim-tree.core"
|
||||
local lib = require "nvim-tree.lib"
|
||||
@ -49,7 +48,6 @@ function M.parent_node(should_close)
|
||||
view.set_cursor { line + 1, 0 }
|
||||
if should_close then
|
||||
parent.open = false
|
||||
diagnostics.update()
|
||||
renderer.draw()
|
||||
end
|
||||
end
|
||||
|
||||
@ -1,5 +1,4 @@
|
||||
local git = require "nvim-tree.git"
|
||||
local diagnostics = require "nvim-tree.diagnostics"
|
||||
local view = require "nvim-tree.view"
|
||||
local renderer = require "nvim-tree.renderer"
|
||||
local explorer_module = require "nvim-tree.explorer"
|
||||
@ -45,7 +44,6 @@ function M.reload_explorer()
|
||||
if view.is_visible() then
|
||||
renderer.draw()
|
||||
end
|
||||
diagnostics.update()
|
||||
event_running = false
|
||||
end
|
||||
|
||||
|
||||
@ -2,7 +2,6 @@ local view = require "nvim-tree.view"
|
||||
local filters = require "nvim-tree.explorer.filters"
|
||||
local renderer = require "nvim-tree.renderer"
|
||||
local reloaders = require "nvim-tree.actions.reloaders"
|
||||
local diagnostics = require "nvim-tree.diagnostics"
|
||||
|
||||
local M = {}
|
||||
|
||||
@ -24,11 +23,6 @@ end
|
||||
function M.help()
|
||||
view.toggle_help()
|
||||
renderer.draw()
|
||||
if view.is_help_ui() then
|
||||
diagnostics.clear()
|
||||
else
|
||||
diagnostics.update()
|
||||
end
|
||||
end
|
||||
|
||||
return M
|
||||
|
||||
@ -1,7 +1,6 @@
|
||||
local api = vim.api
|
||||
|
||||
local renderer = require "nvim-tree.renderer"
|
||||
local diagnostics = require "nvim-tree.diagnostics"
|
||||
local view = require "nvim-tree.view"
|
||||
local core = require "nvim-tree.core"
|
||||
|
||||
@ -71,7 +70,6 @@ function M.expand_or_collapse(node)
|
||||
end
|
||||
|
||||
renderer.draw()
|
||||
diagnostics.update()
|
||||
end
|
||||
|
||||
function M.set_target_win()
|
||||
@ -122,7 +120,6 @@ function M.open(cwd)
|
||||
else
|
||||
open_view_and_draw()
|
||||
end
|
||||
diagnostics.update()
|
||||
view.restore_tab_state()
|
||||
end
|
||||
|
||||
|
||||
@ -1,10 +1,12 @@
|
||||
local core = require "nvim-tree.core"
|
||||
local diagnostics = require "nvim-tree.diagnostics"
|
||||
local log = require "nvim-tree.log"
|
||||
local view = require "nvim-tree.view"
|
||||
|
||||
local _padding = require "nvim-tree.renderer.components.padding"
|
||||
local icon_component = require "nvim-tree.renderer.components.icons"
|
||||
local help = require "nvim-tree.renderer.help"
|
||||
local git = require "nvim-tree.renderer.components.git"
|
||||
local core = require "nvim-tree.core"
|
||||
local Builder = require "nvim-tree.renderer.builder"
|
||||
|
||||
local api = vim.api
|
||||
@ -92,6 +94,12 @@ function M.draw()
|
||||
api.nvim_win_set_cursor(view.get_winnr(), cursor)
|
||||
end
|
||||
|
||||
if view.is_help_ui() then
|
||||
diagnostics.clear()
|
||||
else
|
||||
diagnostics.update()
|
||||
end
|
||||
|
||||
log.profile_end(ps, "draw")
|
||||
end
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user