fix: create buffer during setup schedule

and move view setup before setup schedule
Fixes #951
This commit is contained in:
kiyan
2022-02-09 19:29:43 +01:00
parent f938bcb3ae
commit 879049ac03
3 changed files with 8 additions and 6 deletions

View File

@@ -371,7 +371,9 @@ end
local M = {}
function M.draw()
if not api.nvim_buf_is_loaded(view.View.bufnr) then return end
if not TreeExplorer or not api.nvim_buf_is_loaded(view.View.bufnr) then
return
end
local cursor
if view.win_open() then
cursor = api.nvim_win_get_cursor(view.get_winnr())