mirror of
https://github.com/neovim/neovim
synced 2025-07-20 21:32:16 +00:00
fix(intro): clear intro if new buffer is shown in focused float
This commit is contained in:
@ -424,7 +424,7 @@ int update_screen(void)
|
|||||||
static bool still_may_intro = true;
|
static bool still_may_intro = true;
|
||||||
if (still_may_intro) {
|
if (still_may_intro) {
|
||||||
if (!may_show_intro()) {
|
if (!may_show_intro()) {
|
||||||
must_redraw = UPD_NOT_VALID;
|
redraw_later(firstwin, UPD_NOT_VALID);
|
||||||
still_may_intro = false;
|
still_may_intro = false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1727,6 +1727,48 @@ describe('ui/ext_messages', function()
|
|||||||
}
|
}
|
||||||
end)
|
end)
|
||||||
|
|
||||||
|
it('clears intro screen when new buffer is active in floating window', function()
|
||||||
|
local win_opts = { relative = 'editor', height = 1, width = 5, row = 1, col = 5 }
|
||||||
|
api.nvim_open_win(api.nvim_create_buf(false, false), true, win_opts)
|
||||||
|
screen:expect {
|
||||||
|
grid = [[
|
||||||
|
|
|
||||||
|
{1:~ }{8:^ }{1: }|
|
||||||
|
{1:~ }|*22
|
||||||
|
]],
|
||||||
|
}
|
||||||
|
end)
|
||||||
|
|
||||||
|
it('clears intro screen when initial buffer is active in floating window', function()
|
||||||
|
local win_opts = { relative = 'editor', height = 1, width = 5, row = 1, col = 5 }
|
||||||
|
api.nvim_open_win(api.nvim_get_current_buf(), true, win_opts)
|
||||||
|
screen:expect {
|
||||||
|
grid = [[
|
||||||
|
|
|
||||||
|
{1:~ }{8:^ }{1: }|
|
||||||
|
{1:~ }|*22
|
||||||
|
]],
|
||||||
|
}
|
||||||
|
end)
|
||||||
|
|
||||||
|
it('clears intro screen when initial window is converted to be floating', function()
|
||||||
|
exec_lua([[
|
||||||
|
local init_win_id = vim.api.nvim_get_current_win()
|
||||||
|
vim.cmd('split')
|
||||||
|
local win_opts = { relative = 'editor', height = 1, width = 5, row = 1, col = 5 }
|
||||||
|
vim.api.nvim_win_set_config(init_win_id, win_opts)
|
||||||
|
vim.api.nvim_set_current_win(init_win_id)
|
||||||
|
]])
|
||||||
|
screen:expect {
|
||||||
|
grid = [[
|
||||||
|
|
|
||||||
|
{1:~ }{8:^ }{1: }|
|
||||||
|
{1:~ }|*21
|
||||||
|
{6:[No Name] }|
|
||||||
|
]],
|
||||||
|
}
|
||||||
|
end)
|
||||||
|
|
||||||
it('supports global statusline', function()
|
it('supports global statusline', function()
|
||||||
feed(':set laststatus=3<cr>')
|
feed(':set laststatus=3<cr>')
|
||||||
feed(':sp<cr>')
|
feed(':sp<cr>')
|
||||||
|
Reference in New Issue
Block a user