mirror of
https://github.com/neovim/neovim.git
synced 2026-06-17 01:01:16 +00:00
fix(float): don't unload 'hidden' float buffer with :close! (#39304)
Problem: When closing floating windows to close a tabpage, if the current
buffer will unload, buffers contained in those floating windows
will too (unexpectedly).
Solution: Don't pass along "free_buf" argument; check 'bufhidden' for
the buffer in the to be closed float.
(cherry picked from commit 5b0ad4a060)
Co-authored-by: luukvbaal <luukvbaal@gmail.com>
This commit is contained in:
committed by
GitHub
parent
eebd98fd99
commit
6ae6cf5d61
@@ -1072,6 +1072,15 @@ describe('float window', function()
|
||||
command('close')
|
||||
assert_alive()
|
||||
end)
|
||||
|
||||
it('does not unload bufhidden=hide buffer', function()
|
||||
local buf = api.nvim_create_buf(false, true)
|
||||
command('set nohidden')
|
||||
api.nvim_open_tabpage(0, true, {})
|
||||
api.nvim_open_win(buf, false, { relative = 'editor', width = 1, height = 1, row = 0, col = 0 })
|
||||
command('close!')
|
||||
eq(true, api.nvim_buf_is_loaded(buf))
|
||||
end)
|
||||
end)
|
||||
|
||||
it('placed relative to tabline and laststatus', function()
|
||||
|
||||
Reference in New Issue
Block a user