This commit is contained in:
hrsh7th
2021-10-10 13:13:25 +09:00
parent b16663f780
commit d901dae302

View File

@@ -41,11 +41,12 @@ window.ensure = function(self)
for _, name in ipairs({ 'buf', 'sbuf1', 'subf2' }) do for _, name in ipairs({ 'buf', 'sbuf1', 'subf2' }) do
if not (self[name] and vim.api.nvim_buf_is_valid(self[name])) then if not (self[name] and vim.api.nvim_buf_is_valid(self[name])) then
self[name] = vim.api.nvim_create_buf(false, true) self[name] = vim.api.nvim_create_buf(false, true)
end
-- We always apply options to the buffer to support session related plugins.
vim.api.nvim_buf_set_option(self[name], 'undolevels', -1) vim.api.nvim_buf_set_option(self[name], 'undolevels', -1)
vim.api.nvim_buf_set_option(self[name], 'buftype', 'nofile') vim.api.nvim_buf_set_option(self[name], 'buftype', 'nofile')
vim.api.nvim_buf_set_option(self[name], 'bufhidden', 'hide') vim.api.nvim_buf_set_option(self[name], 'bufhidden', 'hide')
end end
end
end end
---Set window option. ---Set window option.