We do not want to attempt to refresh the discussion tree if the buffer has been
deleted.
This commit is contained in:
Harrison Cramer
2023-08-18 21:38:27 -04:00
parent 16ed361333
commit ce5dd1aaa2

View File

@@ -195,7 +195,7 @@ M.refresh_tree = function()
return return
end end
if not state.SPLIT_BUF then return end if not state.SPLIT_BUF or (vim.fn.bufwinid(state.SPLIT_BUF) == -1) then return end
vim.api.nvim_buf_set_option(state.SPLIT_BUF, 'modifiable', true) vim.api.nvim_buf_set_option(state.SPLIT_BUF, 'modifiable', true)
vim.api.nvim_buf_set_option(state.SPLIT_BUF, 'readonly', false) vim.api.nvim_buf_set_option(state.SPLIT_BUF, 'readonly', false)