mirror of
https://github.com/neovim/neovim.git
synced 2025-02-25 18:55:25 -06:00
Merge pull request #18314 from tk-shirasaka/global-statusline-on-ext_messages
fix: display global statusline correctly with ext_messages
This commit is contained in:
commit
7fa8109881
@ -5490,7 +5490,7 @@ void win_setheight_win(int height, win_T *win)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
cmdline_row = row;
|
cmdline_row = row;
|
||||||
p_ch = MAX(Rows - cmdline_row, 1);
|
p_ch = MAX(Rows - cmdline_row, ui_has(kUIMessages) ? 0 : 1);
|
||||||
curtab->tp_ch_used = p_ch;
|
curtab->tp_ch_used = p_ch;
|
||||||
msg_row = row;
|
msg_row = row;
|
||||||
msg_col = 0;
|
msg_col = 0;
|
||||||
@ -5998,10 +5998,7 @@ void win_drag_status_line(win_T *dragwin, int offset)
|
|||||||
clear_cmdline = true;
|
clear_cmdline = true;
|
||||||
}
|
}
|
||||||
cmdline_row = row;
|
cmdline_row = row;
|
||||||
p_ch = Rows - cmdline_row;
|
p_ch = MAX(Rows - cmdline_row, ui_has(kUIMessages) ? 0 : 1);
|
||||||
if (p_ch < 1) {
|
|
||||||
p_ch = 1;
|
|
||||||
}
|
|
||||||
curtab->tp_ch_used = p_ch;
|
curtab->tp_ch_used = p_ch;
|
||||||
redraw_all_later(SOME_VALID);
|
redraw_all_later(SOME_VALID);
|
||||||
showmode();
|
showmode();
|
||||||
|
@ -12,6 +12,7 @@ local nvim_prog = helpers.nvim_prog
|
|||||||
local iswin = helpers.iswin
|
local iswin = helpers.iswin
|
||||||
local exc_exec = helpers.exc_exec
|
local exc_exec = helpers.exc_exec
|
||||||
local exec_lua = helpers.exec_lua
|
local exec_lua = helpers.exec_lua
|
||||||
|
local poke_eventloop = helpers.poke_eventloop
|
||||||
|
|
||||||
describe('ui/ext_messages', function()
|
describe('ui/ext_messages', function()
|
||||||
local screen
|
local screen
|
||||||
@ -1111,6 +1112,8 @@ describe('ui/ext_messages', function()
|
|||||||
[3] = {bold = true},
|
[3] = {bold = true},
|
||||||
[4] = {bold = true, foreground = Screen.colors.SeaGreen4},
|
[4] = {bold = true, foreground = Screen.colors.SeaGreen4},
|
||||||
[5] = {foreground = Screen.colors.Blue1},
|
[5] = {foreground = Screen.colors.Blue1},
|
||||||
|
[6] = {reverse = true},
|
||||||
|
[7] = {bold = true, reverse = true},
|
||||||
})
|
})
|
||||||
end)
|
end)
|
||||||
|
|
||||||
@ -1202,6 +1205,109 @@ describe('ui/ext_messages', function()
|
|||||||
{content = { { "Press ENTER or type command to continue", 4 } }, kind = "return_prompt" }
|
{content = { { "Press ENTER or type command to continue", 4 } }, kind = "return_prompt" }
|
||||||
}}
|
}}
|
||||||
end)
|
end)
|
||||||
|
|
||||||
|
it('supports global statusline', function()
|
||||||
|
feed(":set laststatus=3<cr>")
|
||||||
|
feed(":sp<cr>")
|
||||||
|
feed("<c-l>")
|
||||||
|
feed(":set cmdheight<cr>")
|
||||||
|
screen:expect({grid=[[
|
||||||
|
^ |
|
||||||
|
{1:~ }|
|
||||||
|
{1:~ }|
|
||||||
|
{1:~ }|
|
||||||
|
{1:~ }|
|
||||||
|
{1:~ }|
|
||||||
|
{1:~ }|
|
||||||
|
{1:~ }|
|
||||||
|
{1:~ }|
|
||||||
|
{1:~ }|
|
||||||
|
{1:~ }|
|
||||||
|
{6:────────────────────────────────────────────────────────────────────────────────}|
|
||||||
|
|
|
||||||
|
{1:~ }|
|
||||||
|
{1:~ }|
|
||||||
|
{1:~ }|
|
||||||
|
{1:~ }|
|
||||||
|
{1:~ }|
|
||||||
|
{1:~ }|
|
||||||
|
{1:~ }|
|
||||||
|
{1:~ }|
|
||||||
|
{1:~ }|
|
||||||
|
{1:~ }|
|
||||||
|
{7:[No Name] }|
|
||||||
|
]], messages={
|
||||||
|
{content = { { " cmdheight=0" } }, kind = "" }
|
||||||
|
}})
|
||||||
|
|
||||||
|
feed("<c-w>+")
|
||||||
|
feed("<c-l>")
|
||||||
|
feed(":set cmdheight<cr>")
|
||||||
|
screen:expect({grid=[[
|
||||||
|
^ |
|
||||||
|
{1:~ }|
|
||||||
|
{1:~ }|
|
||||||
|
{1:~ }|
|
||||||
|
{1:~ }|
|
||||||
|
{1:~ }|
|
||||||
|
{1:~ }|
|
||||||
|
{1:~ }|
|
||||||
|
{1:~ }|
|
||||||
|
{1:~ }|
|
||||||
|
{1:~ }|
|
||||||
|
{1:~ }|
|
||||||
|
{6:────────────────────────────────────────────────────────────────────────────────}|
|
||||||
|
|
|
||||||
|
{1:~ }|
|
||||||
|
{1:~ }|
|
||||||
|
{1:~ }|
|
||||||
|
{1:~ }|
|
||||||
|
{1:~ }|
|
||||||
|
{1:~ }|
|
||||||
|
{1:~ }|
|
||||||
|
{1:~ }|
|
||||||
|
{1:~ }|
|
||||||
|
{7:[No Name] }|
|
||||||
|
]], messages={
|
||||||
|
{content = { { " cmdheight=0" } }, kind = "" }
|
||||||
|
}})
|
||||||
|
|
||||||
|
feed(":set mouse=a<cr>")
|
||||||
|
meths.input_mouse('left', 'press', '', 0, 12, 10)
|
||||||
|
poke_eventloop()
|
||||||
|
meths.input_mouse('left', 'drag', '', 0, 12, 10)
|
||||||
|
meths.input_mouse('left', 'drag', '', 0, 11, 10)
|
||||||
|
feed("<c-l>")
|
||||||
|
feed(":set cmdheight<cr>")
|
||||||
|
screen:expect({grid=[[
|
||||||
|
^ |
|
||||||
|
{1:~ }|
|
||||||
|
{1:~ }|
|
||||||
|
{1:~ }|
|
||||||
|
{1:~ }|
|
||||||
|
{1:~ }|
|
||||||
|
{1:~ }|
|
||||||
|
{1:~ }|
|
||||||
|
{1:~ }|
|
||||||
|
{1:~ }|
|
||||||
|
{1:~ }|
|
||||||
|
{6:────────────────────────────────────────────────────────────────────────────────}|
|
||||||
|
|
|
||||||
|
{1:~ }|
|
||||||
|
{1:~ }|
|
||||||
|
{1:~ }|
|
||||||
|
{1:~ }|
|
||||||
|
{1:~ }|
|
||||||
|
{1:~ }|
|
||||||
|
{1:~ }|
|
||||||
|
{1:~ }|
|
||||||
|
{1:~ }|
|
||||||
|
{1:~ }|
|
||||||
|
{7:[No Name] }|
|
||||||
|
]], messages={
|
||||||
|
{content = { { " cmdheight=0" } }, kind = "" }
|
||||||
|
}})
|
||||||
|
end)
|
||||||
end)
|
end)
|
||||||
|
|
||||||
describe('ui/msg_puts_printf', function()
|
describe('ui/msg_puts_printf', function()
|
||||||
|
Loading…
Reference in New Issue
Block a user