summaryrefslogtreecommitdiff
path: root/src/main.c
diff options
context:
space:
mode:
authorBram Moolenaar <Bram@vim.org>2019-04-21 15:55:10 +0200
committerBram Moolenaar <Bram@vim.org>2019-04-21 15:55:10 +0200
commitc75e81262347e47a69faabd72caf89fec3f06e8f (patch)
treeca8a14b72659f70941b53207a27453c288d8057f /src/main.c
parent7bde95a461fafaa15cc45a006eaa4d0f3c2dfe92 (diff)
downloadvim-git-c75e81262347e47a69faabd72caf89fec3f06e8f.tar.gz
patch 8.1.1197: when starting with multiple tabs file messages is confusingv8.1.1197
Problem: When starting with multiple tabs file messages is confusing. Solution: Set 'shortmess' when loading the other tabs. (Christian Brabandt)
Diffstat (limited to 'src/main.c')
-rw-r--r--src/main.c18
1 files changed, 18 insertions, 0 deletions
diff --git a/src/main.c b/src/main.c
index 5edcbdf8f..0f26e984a 100644
--- a/src/main.c
+++ b/src/main.c
@@ -2777,6 +2777,7 @@ edit_buffers(
int i;
int advance = TRUE;
win_T *win;
+ char_u *p_shm_save = NULL;
/*
* Don't execute Win/Buf Enter/Leave autocommands here
@@ -2812,6 +2813,17 @@ edit_buffers(
if (curtab->tp_next == NULL) /* just checking */
break;
goto_tabpage(0);
+ // Temporarily reset 'shm' option to not print fileinfo when
+ // loading the other buffers. This would overwrite the already
+ // existing fileinfo for the first tab.
+ if (i == 1)
+ {
+ char buf[100];
+
+ p_shm_save = vim_strsave(p_shm);
+ vim_snprintf(buf, 100, "F%s", p_shm);
+ set_option_value((char_u *)"shm", 0L, (char_u *)buf, 0);
+ }
}
else
{
@@ -2861,6 +2873,12 @@ edit_buffers(
}
}
+ if (p_shm_save != NULL)
+ {
+ set_option_value((char_u *)"shm", 0L, p_shm_save, 0);
+ vim_free(p_shm_save);
+ }
+
if (parmp->window_layout == WIN_TABS)
goto_tabpage(1);
--autocmd_no_enter;