fix(#549): add more profiling ~tree init

This commit is contained in:
Alexander Courtis
2022-12-16 12:12:06 +11:00
parent 899ed45602
commit 95ed588211
3 changed files with 19 additions and 0 deletions

View File

@@ -2,6 +2,7 @@ local M = {}
local events = require "nvim-tree.events"
local utils = require "nvim-tree.utils"
local log = require "nvim-tree.log"
local function get_win_sep_hl()
-- #1221 WinSeparator not present in nvim 0.6.1 and some builds of 0.7.0
@@ -231,6 +232,9 @@ function M.open(options)
return
end
local pn = string.format "view open"
local ps = log.profile_start(pn)
create_buffer()
open_window()
M.resize()
@@ -240,6 +244,8 @@ function M.open(options)
vim.cmd "wincmd p"
end
events._dispatch_on_tree_open()
log.profile_end(ps, pn)
end
local function grow()