Skip to content
forked from neovim/neovim

Commit

Permalink
Merge pull request neovim#18975 from neovim/backport-18969-to-release…
Browse files Browse the repository at this point in the history
…-0.7

[Backport release-0.7] fix(ui): do not call showmode() when setting window height
  • Loading branch information
zeertzjq committed Jun 15, 2022
2 parents 3cea4d6 + bf4df2a commit 5243cb8
Show file tree
Hide file tree
Showing 2 changed files with 33 additions and 1 deletion.
1 change: 0 additions & 1 deletion src/nvim/window.c
Original file line number Diff line number Diff line change
Expand Up @@ -5504,7 +5504,6 @@ void win_setheight_win(int height, win_T *win)
msg_row = row;
msg_col = 0;
redraw_all_later(NOT_VALID);
showmode();
}
}

Expand Down
33 changes: 33 additions & 0 deletions test/functional/ui/cmdline_spec.lua
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,8 @@ local function new_screen(opt)
[5] = {bold = true, foreground = Screen.colors.SeaGreen4},
[6] = {foreground = Screen.colors.Magenta},
[7] = {bold = true, foreground = Screen.colors.Brown},
[8] = {background = Screen.colors.LightGrey},
[9] = {bold = true},
})
return screen
end
Expand Down Expand Up @@ -846,6 +848,37 @@ describe('cmdline redraw', function()
456789^ |
]], unchanged=true}
end)

it('after pressing Ctrl-C in cmdwin in Visual mode #18967', function()
screen:try_resize(40, 10)
command('set cmdwinheight=3')
feed('q:iabc<Esc>vhh')
screen:expect([[
|
{1:~ }|
{1:~ }|
{1:~ }|
{2:[No Name] }|
{1::}^a{8:bc} |
{1:~ }|
{1:~ }|
{3:[Command Line] }|
{9:-- VISUAL --} |
]])
feed('<C-C>')
screen:expect([[
|
{1:~ }|
{1:~ }|
{1:~ }|
{2:[No Name] }|
{1::}a{8:bc} |
{1:~ }|
{1:~ }|
{3:[Command Line] }|
:^abc |
]])
end)
end)

describe("cmdline height", function()
Expand Down

0 comments on commit 5243cb8

Please sign in to comment.