Mercurial > vim
comparison src/main.c @ 16385:bb0f7cb7e2d5 v8.1.1197
patch 8.1.1197: when starting with multiple tabs file messages is confusing
commit https://github.com/vim/vim/commit/c75e81262347e47a69faabd72caf89fec3f06e8f
Author: Bram Moolenaar <Bram@vim.org>
Date: Sun Apr 21 15:55:10 2019 +0200
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)
author | Bram Moolenaar <Bram@vim.org> |
---|---|
date | Sun, 21 Apr 2019 16:00:04 +0200 |
parents | abb67309c1ca |
children | 7ae2396cef62 |
comparison
equal
deleted
inserted
replaced
16384:051dc2ab1745 | 16385:bb0f7cb7e2d5 |
---|---|
2775 { | 2775 { |
2776 int arg_idx; /* index in argument list */ | 2776 int arg_idx; /* index in argument list */ |
2777 int i; | 2777 int i; |
2778 int advance = TRUE; | 2778 int advance = TRUE; |
2779 win_T *win; | 2779 win_T *win; |
2780 char_u *p_shm_save = NULL; | |
2780 | 2781 |
2781 /* | 2782 /* |
2782 * Don't execute Win/Buf Enter/Leave autocommands here | 2783 * Don't execute Win/Buf Enter/Leave autocommands here |
2783 */ | 2784 */ |
2784 ++autocmd_no_enter; | 2785 ++autocmd_no_enter; |
2810 if (parmp->window_layout == WIN_TABS) | 2811 if (parmp->window_layout == WIN_TABS) |
2811 { | 2812 { |
2812 if (curtab->tp_next == NULL) /* just checking */ | 2813 if (curtab->tp_next == NULL) /* just checking */ |
2813 break; | 2814 break; |
2814 goto_tabpage(0); | 2815 goto_tabpage(0); |
2816 // Temporarily reset 'shm' option to not print fileinfo when | |
2817 // loading the other buffers. This would overwrite the already | |
2818 // existing fileinfo for the first tab. | |
2819 if (i == 1) | |
2820 { | |
2821 char buf[100]; | |
2822 | |
2823 p_shm_save = vim_strsave(p_shm); | |
2824 vim_snprintf(buf, 100, "F%s", p_shm); | |
2825 set_option_value((char_u *)"shm", 0L, (char_u *)buf, 0); | |
2826 } | |
2815 } | 2827 } |
2816 else | 2828 else |
2817 { | 2829 { |
2818 if (curwin->w_next == NULL) /* just checking */ | 2830 if (curwin->w_next == NULL) /* just checking */ |
2819 break; | 2831 break; |
2857 if (got_int) | 2869 if (got_int) |
2858 { | 2870 { |
2859 (void)vgetc(); /* only break the file loading, not the rest */ | 2871 (void)vgetc(); /* only break the file loading, not the rest */ |
2860 break; | 2872 break; |
2861 } | 2873 } |
2874 } | |
2875 | |
2876 if (p_shm_save != NULL) | |
2877 { | |
2878 set_option_value((char_u *)"shm", 0L, p_shm_save, 0); | |
2879 vim_free(p_shm_save); | |
2862 } | 2880 } |
2863 | 2881 |
2864 if (parmp->window_layout == WIN_TABS) | 2882 if (parmp->window_layout == WIN_TABS) |
2865 goto_tabpage(1); | 2883 goto_tabpage(1); |
2866 --autocmd_no_enter; | 2884 --autocmd_no_enter; |