Mercurial > vim
comparison src/window.c @ 19143:bfcafd1a3e37 v8.2.0131
patch 8.2.0131: command line is not cleared when switching tabs
Commit: https://github.com/vim/vim/commit/479950f6c9aee4806f28a2b2fe5471e18a034cff
Author: Bram Moolenaar <Bram@vim.org>
Date: Sun Jan 19 15:45:17 2020 +0100
patch 8.2.0131: command line is not cleared when switching tabs
Problem: Command line is not cleared when switching tabs and the command
line height differs.
Solution: Set the "clear_cmdline" flag when needed. (Naruhiko Nishino,
closes #5495)
author | Bram Moolenaar <Bram@vim.org> |
---|---|
date | Sun, 19 Jan 2020 16:00:04 +0100 |
parents | 050f5eaa9e50 |
children | 013f20a3bc6b |
comparison
equal
deleted
inserted
replaced
19142:3b7117916bb9 | 19143:bfcafd1a3e37 |
---|---|
4091 tabpage_T *tp, | 4091 tabpage_T *tp, |
4092 buf_T *old_curbuf UNUSED, | 4092 buf_T *old_curbuf UNUSED, |
4093 int trigger_enter_autocmds, | 4093 int trigger_enter_autocmds, |
4094 int trigger_leave_autocmds) | 4094 int trigger_leave_autocmds) |
4095 { | 4095 { |
4096 int row; | |
4096 int old_off = tp->tp_firstwin->w_winrow; | 4097 int old_off = tp->tp_firstwin->w_winrow; |
4097 win_T *next_prevwin = tp->tp_prevwin; | 4098 win_T *next_prevwin = tp->tp_prevwin; |
4098 | 4099 |
4099 curtab = tp; | 4100 curtab = tp; |
4100 firstwin = tp->tp_firstwin; | 4101 firstwin = tp->tp_firstwin; |
4107 win_enter_ext(tp->tp_curwin, FALSE, TRUE, FALSE, | 4108 win_enter_ext(tp->tp_curwin, FALSE, TRUE, FALSE, |
4108 trigger_enter_autocmds, trigger_leave_autocmds); | 4109 trigger_enter_autocmds, trigger_leave_autocmds); |
4109 prevwin = next_prevwin; | 4110 prevwin = next_prevwin; |
4110 | 4111 |
4111 last_status(FALSE); // status line may appear or disappear | 4112 last_status(FALSE); // status line may appear or disappear |
4112 (void)win_comp_pos(); // recompute w_winrow for all windows | 4113 row = win_comp_pos(); // recompute w_winrow for all windows |
4113 #ifdef FEAT_DIFF | 4114 #ifdef FEAT_DIFF |
4114 diff_need_scrollbind = TRUE; | 4115 diff_need_scrollbind = TRUE; |
4115 #endif | 4116 #endif |
4116 | 4117 |
4117 // The tabpage line may have appeared or disappeared, may need to resize | 4118 // The tabpage line may have appeared or disappeared, may need to resize |
4119 // frame sizes too. Use the stored value of p_ch, so that it can be | 4120 // frame sizes too. Use the stored value of p_ch, so that it can be |
4120 // different for each tab page. | 4121 // different for each tab page. |
4121 if (p_ch != curtab->tp_ch_used) | 4122 if (p_ch != curtab->tp_ch_used) |
4122 clear_cmdline = TRUE; | 4123 clear_cmdline = TRUE; |
4123 p_ch = curtab->tp_ch_used; | 4124 p_ch = curtab->tp_ch_used; |
4125 | |
4126 // When cmdheight is changed in a tab page with '<C-w>-', cmdline_row is | |
4127 // changed but p_ch and tp_ch_used are not changed. Thus we also need to | |
4128 // check cmdline_row. | |
4129 if ((row < cmdline_row) && (cmdline_row <= Rows - p_ch)) | |
4130 clear_cmdline = TRUE; | |
4131 | |
4124 if (curtab->tp_old_Rows != Rows || (old_off != firstwin->w_winrow | 4132 if (curtab->tp_old_Rows != Rows || (old_off != firstwin->w_winrow |
4125 #ifdef FEAT_GUI_TABLINE | 4133 #ifdef FEAT_GUI_TABLINE |
4126 && !gui_use_tabline() | 4134 && !gui_use_tabline() |
4127 #endif | 4135 #endif |
4128 )) | 4136 )) |