From 6994cc4d1ae5cde52e0208d01efcffbd7a34e5e9 Mon Sep 17 00:00:00 2001 From: Björn Linse Date: Thu, 25 Oct 2018 17:40:24 +0200 Subject: 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 --- test/functional/ui/screen_basic_spec.lua | 40 ++++++++++++++++++++++++++++++++ 1 file changed, 40 insertions(+) (limited to 'test') diff --git a/test/functional/ui/screen_basic_spec.lua b/test/functional/ui/screen_basic_spec.lua index 3e930b0ae7..1a8b7d543a 100644 --- a/test/functional/ui/screen_basic_spec.lua +++ b/test/functional/ui/screen_basic_spec.lua @@ -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() -- cgit