fix: set buftype to nofile so that the plugin does not save the cell by

accident.
This commit is contained in:
Zhe Yu 2024-07-25 21:12:00 +01:00
parent a00222ffc6
commit f2fcd54c7e

View File

@ -117,6 +117,8 @@ function M:_open_preview_window()
height = 1 height = 1
}) })
vim.api.nvim_set_option_value("buftype", "nofile", { buf = self.preview_buffer })
-- Disable default highlight -- Disable default highlight
vim.api.nvim_set_option_value( vim.api.nvim_set_option_value(
"winhighlight", "winhighlight",
@ -146,6 +148,8 @@ function M:_open_prompt_window()
height = 1 height = 1
}) })
vim.api.nvim_set_option_value("buftype", "nofile", { buf = self.prompt_buffer })
vim.api.nvim_set_option_value('winhighlight', "Normal:Normal", { win = self.prompt_window }) vim.api.nvim_set_option_value('winhighlight', "Normal:Normal", { win = self.prompt_window })
end end