aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/main.c
diff options
context:
space:
mode:
authorJan Edmund Lazo <jan.lazo@mail.utoronto.ca>2019-09-08 15:44:14 -0400
committerJan Edmund Lazo <jan.lazo@mail.utoronto.ca>2019-09-08 23:16:54 -0400
commit8dde9b58e56345c8c04620d513b55d3b518ea98e (patch)
tree3eee5ce39d8465481079844f1d0a97f64e375e3f /src/nvim/main.c
parent74c362cec029ba39a8eb0bbd629148e4b6b54968 (diff)
downloadrneovim-8dde9b58e56345c8c04620d513b55d3b518ea98e.tar.gz
rneovim-8dde9b58e56345c8c04620d513b55d3b518ea98e.tar.bz2
rneovim-8dde9b58e56345c8c04620d513b55d3b518ea98e.zip
vim-patch:8.1.1197: when starting with multiple tabs file messages is confusing
Problem: When starting with multiple tabs file messages is confusing. Solution: Set 'shortmess' when loading the other tabs. (Christian Brabandt) https://github.com/vim/vim/commit/c75e81262347e47a69faabd72caf89fec3f06e8f
Diffstat (limited to 'src/nvim/main.c')
-rw-r--r--src/nvim/main.c16
1 files changed, 16 insertions, 0 deletions
diff --git a/src/nvim/main.c b/src/nvim/main.c
index 4335dab1f9..bca8991b0f 100644
--- a/src/nvim/main.c
+++ b/src/nvim/main.c
@@ -1535,6 +1535,7 @@ static void edit_buffers(mparm_T *parmp, char_u *cwd)
int i;
bool advance = true;
win_T *win;
+ char *p_shm_save = NULL;
/*
* Don't execute Win/Buf Enter/Leave autocommands here
@@ -1566,6 +1567,16 @@ static void edit_buffers(mparm_T *parmp, char_u *cwd)
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 = xstrdup((char *)p_shm);
+ snprintf(buf, sizeof(buf), "F%s", p_shm);
+ set_option_value("shm", 0L, buf, 0);
+ }
} else {
if (curwin->w_next == NULL) /* just checking */
break;
@@ -1606,6 +1617,11 @@ static void edit_buffers(mparm_T *parmp, char_u *cwd)
}
}
+ if (p_shm_save != NULL) {
+ set_option_value("shm", 0L, p_shm_save, 0);
+ xfree(p_shm_save);
+ }
+
if (parmp->window_layout == WIN_TABS)
goto_tabpage(1);
--autocmd_no_enter;