diff options
-rw-r--r-- | runtime/doc/filetype.txt | 2 | ||||
-rw-r--r-- | src/nvim/window.c | 1 | ||||
-rw-r--r-- | test/functional/ui/screen_basic_spec.lua | 40 |
3 files changed, 42 insertions, 1 deletions
diff --git a/runtime/doc/filetype.txt b/runtime/doc/filetype.txt index 5047e7c23e..6ac14e4122 100644 --- a/runtime/doc/filetype.txt +++ b/runtime/doc/filetype.txt @@ -512,7 +512,7 @@ View manpages in Nvim. Supports highlighting, completion, locales, and navigation. Also see |find-manpage|. To use Nvim as a manpager: > - export MANPAGER="nvim +Man!" + export MANPAGER='nvim +Man!' man.vim will always attempt to reuse the closest man window (above/left) but otherwise create a split. diff --git a/src/nvim/window.c b/src/nvim/window.c index 56caf7a941..8be79f0cff 100644 --- a/src/nvim/window.c +++ b/src/nvim/window.c @@ -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; } /* 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() |