aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/nvim/drawscreen.c14
-rw-r--r--src/nvim/version.c14
2 files changed, 16 insertions, 12 deletions
diff --git a/src/nvim/drawscreen.c b/src/nvim/drawscreen.c
index f2ad4ca77e..1fb42af786 100644
--- a/src/nvim/drawscreen.c
+++ b/src/nvim/drawscreen.c
@@ -421,7 +421,14 @@ bool redrawing(void)
/// and redraw_all_later() to mark parts of the screen as needing a redraw.
int update_screen(void)
{
- static bool did_intro = false;
+ static bool still_may_intro = true;
+ if (still_may_intro) {
+ if (!may_show_intro()) {
+ must_redraw = UPD_NOT_VALID;
+ still_may_intro = false;
+ }
+ }
+
bool is_stl_global = global_stl_height() > 0;
// Don't do anything if the screen structures are (not yet) valid.
@@ -673,10 +680,9 @@ int update_screen(void)
}
// May put up an introductory message when not editing a file
- if (!did_intro) {
- maybe_intro_message();
+ if (still_may_intro) {
+ intro_message(false);
}
- did_intro = true;
decor_providers_invoke_end();
diff --git a/src/nvim/version.c b/src/nvim/version.c
index 038c9701bf..ff6f7835b2 100644
--- a/src/nvim/version.c
+++ b/src/nvim/version.c
@@ -2710,15 +2710,13 @@ void list_version(void)
: "\nRun \":verbose version\" for more info"));
}
-/// Show the intro message when not editing a file.
-void maybe_intro_message(void)
+/// Whether it still is not too late to show an intro message
+bool may_show_intro(void)
{
- if (buf_is_empty(curbuf)
- && (curbuf->b_fname == NULL)
- && (firstwin->w_next == NULL)
- && (vim_strchr(p_shm, SHM_INTRO) == NULL)) {
- intro_message(false);
- }
+ return (buf_is_empty(curbuf)
+ && (curbuf->b_fname == NULL)
+ && (firstwin->w_next == NULL)
+ && (vim_strchr(p_shm, SHM_INTRO) == NULL));
}
/// Give an introductory message about Vim.