To: vim_dev@googlegroups.com Subject: Patch 8.2.3773 Fcc: outbox From: Bram Moolenaar Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ------------ Patch 8.2.3773 Problem: Wrong window size when a modeline changes 'columns' and there is more than one tabpage. (Michael Soyka) Solution: Adjust the frames of all tabpages. (closes #9315) Files: src/window.c *** ../vim-8.2.3772/src/window.c 2021-12-09 11:57:19.159557375 +0000 --- src/window.c 2021-12-10 12:09:11.483402115 +0000 *************** *** 5353,5370 **** void shell_new_rows(void) { ! int h = (int)ROWS_AVAIL; if (firstwin == NULL) // not initialized yet return; - if (h < frame_minheight(topframe, NULL)) - h = frame_minheight(topframe, NULL); ! // First try setting the heights of windows with 'winfixheight'. If ! // that doesn't result in the right height, forget about that option. ! frame_new_height(topframe, h, FALSE, TRUE); ! if (!frame_check_height(topframe, h)) ! frame_new_height(topframe, h, FALSE, FALSE); (void)win_comp_pos(); // recompute w_winrow and w_wincol compute_cmdrow(); --- 5353,5376 ---- void shell_new_rows(void) { ! tabpage_T *tp; if (firstwin == NULL) // not initialized yet return; ! FOR_ALL_TABPAGES(tp) ! { ! int h = (int)ROWS_AVAIL; ! ! if (h < frame_minheight(tp->tp_topframe, NULL)) ! h = frame_minheight(tp->tp_topframe, NULL); ! ! // First try setting the heights of windows with 'winfixheight'. If ! // that doesn't result in the right height, forget about that option. ! frame_new_height(tp->tp_topframe, h, FALSE, TRUE); ! if (!frame_check_height(tp->tp_topframe, h)) ! frame_new_height(tp->tp_topframe, h, FALSE, FALSE); ! } (void)win_comp_pos(); // recompute w_winrow and w_wincol compute_cmdrow(); *************** *** 5383,5396 **** void shell_new_columns(void) { if (firstwin == NULL) // not initialized yet return; ! // First try setting the widths of windows with 'winfixwidth'. If that ! // doesn't result in the right width, forget about that option. ! frame_new_width(topframe, (int)Columns, FALSE, TRUE); ! if (!frame_check_width(topframe, Columns)) ! frame_new_width(topframe, (int)Columns, FALSE, FALSE); (void)win_comp_pos(); // recompute w_winrow and w_wincol #if 0 --- 5389,5407 ---- void shell_new_columns(void) { + tabpage_T *tp; + if (firstwin == NULL) // not initialized yet return; ! FOR_ALL_TABPAGES(tp) ! { ! // First try setting the widths of windows with 'winfixwidth'. If that ! // doesn't result in the right width, forget about that option. ! frame_new_width(tp->tp_topframe, (int)Columns, FALSE, TRUE); ! if (!frame_check_width(tp->tp_topframe, Columns)) ! frame_new_width(tp->tp_topframe, (int)Columns, FALSE, FALSE); ! } (void)win_comp_pos(); // recompute w_winrow and w_wincol #if 0 *** ../vim-8.2.3772/src/version.c 2021-12-10 10:57:04.812422628 +0000 --- src/version.c 2021-12-10 12:10:41.767588353 +0000 *************** *** 755,756 **** --- 755,758 ---- { /* Add new patch number below this line */ + /**/ + 3773, /**/ -- hundred-and-one symptoms of being an internet addict: 28. You have comandeered your teenager's phone line for the net and even his friends know not to call on his line anymore. /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ /// \\\ \\\ sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ /// \\\ help me help AIDS victims -- http://ICCF-Holland.org ///