Added a modified=false to documentation buffer, so it can be removed without E89 errors (#1557)

This commit is contained in:
Felipe Gomes
2023-05-05 03:54:16 -03:00
committed by GitHub
parent 0e120a6373
commit 1cad30fcff

View File

@@ -58,6 +58,9 @@ docs_view.open = function(self, e, view)
}) })
end end
-- Set buffer as not modified, so it can be removed without errors
vim.api.nvim_buf_set_option(self.window:get_buffer(), 'modified', false)
-- Calculate window size. -- Calculate window size.
local width, height = vim.lsp.util._make_floating_popup_size(vim.api.nvim_buf_get_lines(self.window:get_buffer(), 0, -1, false), { local width, height = vim.lsp.util._make_floating_popup_size(vim.api.nvim_buf_get_lines(self.window:get_buffer(), 0, -1, false), {
max_width = max_width - border_info.horiz, max_width = max_width - border_info.horiz,