diff options
author | bfredl <bjorn.linse@gmail.com> | 2024-03-14 10:03:59 +0100 |
---|---|---|
committer | bfredl <bjorn.linse@gmail.com> | 2024-03-14 14:39:08 +0100 |
commit | 0570a19c8a84debcdf2bc73f4c5f2d7d9de3ead2 (patch) | |
tree | 305bc90ee3b7aa1118d45f69dd8383c756b4b661 /src/nvim/version.c | |
parent | 8955cef0c6963678994347dbf95ed09fc8e29407 (diff) | |
download | rneovim-0570a19c8a84debcdf2bc73f4c5f2d7d9de3ead2.tar.gz rneovim-0570a19c8a84debcdf2bc73f4c5f2d7d9de3ead2.tar.bz2 rneovim-0570a19c8a84debcdf2bc73f4c5f2d7d9de3ead2.zip |
fix(intro): make intro explicitly stateful
Instead of randomly disappearing because some random event might have
caused mid_start or bot_scroll_start to randomly take a low value, treat
intro message as a _first class stateful_ thing.
This means that intro message will kept being _redrawn_ as long as we
are in the state it should be shown. This also includes screen resizes.
you will not lose the intro message because there was a delay in
detecting terminal features.
Diffstat (limited to 'src/nvim/version.c')
-rw-r--r-- | src/nvim/version.c | 14 |
1 files changed, 6 insertions, 8 deletions
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. |