fix: wipe buffer before initializing

Buffer was wiped after being created which resulted in trying to setting
buffer options and name to nil buffer.
fixes #1031
This commit is contained in:
kiyan
2022-03-06 12:00:51 +01:00
parent 7878e92cd5
commit b493e23ed7

View File

@@ -62,9 +62,10 @@ local function wipe_rogue_buffer()
end
local function create_buffer(bufnr)
wipe_rogue_buffer()
local tab = a.nvim_get_current_tabpage()
BUFNR_PER_TAB[tab] = bufnr or a.nvim_create_buf(false, false)
wipe_rogue_buffer()
a.nvim_buf_set_name(M.get_bufnr(), 'NvimTree_'..tab)
for option, value in pairs(BUFFER_OPTIONS) do