mirror of
https://github.com/neovim/neovim.git
synced 2026-07-18 15:11:40 +00:00
fix(cmdwin): set 'buflisted'
Problem: Legacy cmdwin set 'buflisted', but new one doesn't. https://github.com/neovim/neovim/issues/40431#issuecomment-4811593353 'buflisted' useful for: - "bufferline" style tablines, they usually show only listed buffers. - some automatic actions can be conditioned on whether a buffer is listed; 'buflisted' signals that the buffer is "important enough". Solution: Set 'buflisted'.
This commit is contained in:
@@ -74,7 +74,7 @@ function M.open(type, init_line, init_col)
|
||||
vim.bo[buf].buftype = 'nofile'
|
||||
vim.bo[buf].bufhidden = 'wipe'
|
||||
vim.bo[buf].swapfile = false
|
||||
vim.bo[buf].buflisted = false
|
||||
vim.bo[buf].buflisted = true -- #40431
|
||||
vim.wo[win][0].winfixbuf = true
|
||||
vim.wo[win][0].foldenable = false
|
||||
-- Show cmdwin-char via 'statuscolumn'.
|
||||
|
||||
@@ -22,6 +22,7 @@ describe('cmdwin', function()
|
||||
eq('nofile', api.nvim_get_option_value('buftype', { buf = 0 }))
|
||||
eq('wipe', api.nvim_get_option_value('bufhidden', { buf = 0 }))
|
||||
eq(false, api.nvim_get_option_value('swapfile', { buf = 0 }))
|
||||
eq(true, api.nvim_get_option_value('buflisted', { buf = 0 })) -- #40431
|
||||
eq(true, api.nvim_get_option_value('winfixbuf', { win = 0 }))
|
||||
|
||||
-- <CR> executes the cmdline
|
||||
|
||||
Reference in New Issue
Block a user