committed by
GitHub
parent
015234e032
commit
54c78dbca2
@@ -1,3 +1,4 @@
|
||||
local log = require "nvim-tree.log"
|
||||
local utils = require "nvim-tree.utils"
|
||||
local view = require "nvim-tree.view"
|
||||
local _padding = require "nvim-tree.renderer.padding"
|
||||
@@ -238,6 +239,9 @@ function M.draw()
|
||||
if not core.get_explorer() or not bufnr or not api.nvim_buf_is_loaded(bufnr) then
|
||||
return
|
||||
end
|
||||
|
||||
local ps = log.profile_start "draw"
|
||||
|
||||
local cursor
|
||||
if view.is_visible() then
|
||||
cursor = api.nvim_win_get_cursor(view.get_winnr())
|
||||
@@ -266,6 +270,8 @@ function M.draw()
|
||||
if cursor and #lines >= cursor[1] then
|
||||
api.nvim_win_set_cursor(view.get_winnr(), cursor)
|
||||
end
|
||||
|
||||
log.profile_end(ps, "draw")
|
||||
end
|
||||
|
||||
function M.render_hl(bufnr)
|
||||
|
||||
Reference in New Issue
Block a user