We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 1b9874f commit cb55fdeCopy full SHA for cb55fde
1 file changed
lua/astrocore/buffer.lua
@@ -77,12 +77,8 @@ end
77
function M.is_restorable(bufnr)
78
if not M.is_valid(bufnr) or vim.bo[bufnr].bufhidden ~= "" then return false end
79
80
- if vim.bo[bufnr].buftype == "" then
81
- -- Normal buffer, check if it listed.
82
- if not vim.bo[bufnr].buflisted then return false end
83
- -- Check if it has a filename.
84
- if vim.api.nvim_buf_get_name(bufnr) == "" then return false end
85
- end
+ -- Check if it has a filename.
+ if vim.api.nvim_buf_get_name(bufnr) == "" then return false end
86
87
local session_ignore = vim.tbl_get(astro.config, "sessions", "ignore") or {}
88
if
@@ -91,7 +87,7 @@ function M.is_restorable(bufnr)
91
then
92
return false
93
89
end
94
- return true
90
+ return vim.bo[bufnr].buflisted
95
96
97
--- Check if the current buffers form a valid session
0 commit comments