UI: add missing redraw after enter_tabpage

redraw_all_later() isn't guaranteed to update must_redraw after
switching tab, we must do it ourselves.

fixes #9152
This commit is contained in:
Björn Linse 2018-10-25 17:40:24 +02:00
parent c03a0f5fc8
commit 6994cc4d1a
2 changed files with 41 additions and 0 deletions

View File

@ -3336,6 +3336,7 @@ static void enter_tabpage(tabpage_T *tp, buf_T *old_curbuf, int trigger_enter_au
}
redraw_all_later(NOT_VALID);
must_redraw = NOT_VALID;
}
/*

View File

@ -449,6 +449,46 @@ local function screen_tests(linegrid)
|
]])
end)
it('redraws unvisited tab #9152', function()
insert('hello')
-- create a tab without visiting it
command('tabnew|tabnext')
screen:expect([[
{2: + [No Name] }{4: [No Name] }{3: }{4:X}|
hell^o |
{0:~ }|
{0:~ }|
{0:~ }|
{0:~ }|
{0:~ }|
{0:~ }|
{0:~ }|
{0:~ }|
{0:~ }|
{0:~ }|
{0:~ }|
|
]])
feed('gT')
screen:expect([[
{4: + [No Name] }{2: [No Name] }{3: }{4:X}|
^ |
{0:~ }|
{0:~ }|
{0:~ }|
{0:~ }|
{0:~ }|
{0:~ }|
{0:~ }|
{0:~ }|
{0:~ }|
{0:~ }|
{0:~ }|
|
]])
end)
end)
describe('insert mode', function()