We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Describe the bug
The option close_unsupported_windows = true will close the terminal window, event there are "terminal" in sessionoptions.
close_unsupported_windows = true
sessionoptions
To Reproduce Steps to reproduce the behavior:
tabnew
terminal
SessionSave
Expected behavior Restore the terminal window.
Screenshots Before close:
After restore, terminal is missing:
Baseline:
Minimal config to reproduce:
vim.env.LAZY_STDPATH = ".repro" load(vim.fn.system("curl -s https://raw.githubusercontent.com/folke/lazy.nvim/main/bootstrap.lua"))() require("lazy.minit").repro({ spec = { { "rmagatti/auto-session", opts = {}, }, }, }) vim.o.sessionoptions = "buffers,curdir,folds,help,tabpages,winsize,resize,winpos,terminal,globals" vim.o.showtabline = 2 vim.o.background = "dark"
Save this file to repro.lua, use nvim -u repro.lua to open nvim with this config.
repro.lua
nvim -u repro.lua
Additional context
Because there is a "terminal" option in sessionoptions, I think the terminal window shouldn't be close when this option is active.
I use this function to clean buffers before, maybe helps you:
local function clean_buffers() local bufs = vim.api.nvim_list_bufs() for _, buf in ipairs(bufs) do local name = vim.api.nvim_buf_get_name(buf) local type = vim.api.nvim_get_option_value('buftype', { buf = buf }) if name ~= '' and type ~= '' and type ~= 'terminal' then vim.api.nvim_buf_delete(buf, {}) end end end
The text was updated successfully, but these errors were encountered:
Great catch! I'll get a fix out. thanks!
Sorry, something went wrong.
ba30ea9
Merge pull request #343 from cameronr/main
fe705ee
fix: #342 don't close terminal windows
rmagatti
No branches or pull requests
Describe the bug
The option
close_unsupported_windows = true
will close the terminal window, event there are "terminal" insessionoptions
.To Reproduce
Steps to reproduce the behavior:
tabnew
create new tabpageterminal
open a terminalSessionSave
create sessionExpected behavior
Restore the terminal window.
Screenshots
Before close:
After restore, terminal is missing:
Baseline:
Minimal config to reproduce:
Save this file to
repro.lua
, usenvim -u repro.lua
to open nvim with this config.Additional context
Because there is a "terminal" option in
sessionoptions
, I think the terminal window shouldn't be close when this option is active.I use this function to clean buffers before, maybe helps you:
The text was updated successfully, but these errors were encountered: