To: vim-dev@vim.org Subject: Patch 6.2.268 Fcc: outbox From: Bram Moolenaar Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 8bit ------------ Patch 6.2.268 Problem: GUI: When changing 'guioptions' part of the window may be off screen. (Randall Morris) Solution: Adjust the size of the window when changing 'guioptions', but only when adding something. Files: src/gui.c *** ../vim-6.2.267/src/gui.c Fri Feb 6 19:19:20 2004 --- src/gui.c Tue Feb 17 16:31:55 2004 *************** *** 3051,3056 **** --- 3051,3057 ---- #endif win_T *wp; int need_set_size; + int fix_size; #ifdef FEAT_MENU if (oldval != NULL && gui.in_use) *************** *** 3125,3130 **** --- 3126,3132 ---- if (gui.in_use) { need_set_size = FALSE; + fix_size = FALSE; for (i = 0; i < 3; i++) { if (gui.which_scrollbars[i] != prev_which_scrollbars[i]) *************** *** 3140,3145 **** --- 3142,3149 ---- } } need_set_size = TRUE; + if (gui.which_scrollbars[i]) + fix_size = TRUE; } prev_which_scrollbars[i] = gui.which_scrollbars[i]; } *************** *** 3150,3155 **** --- 3154,3161 ---- gui_mch_enable_menu(gui.menu_is_active); prev_menu_is_active = gui.menu_is_active; need_set_size = TRUE; + if (gui.menu_is_active) + fix_size = TRUE; } #endif *************** *** 3159,3164 **** --- 3165,3172 ---- gui_mch_show_toolbar(using_toolbar); prev_toolbar = using_toolbar; need_set_size = TRUE; + if (using_toolbar) + fix_size = TRUE; } #endif #ifdef FEAT_FOOTER *************** *** 3167,3172 **** --- 3175,3182 ---- gui_mch_enable_footer(using_footer); prev_footer = using_footer; need_set_size = TRUE; + if (using_footer) + fix_size = TRUE; } #endif #if defined(FEAT_MENU) && !defined(WIN16) && !(defined(WIN3264) && !defined(FEAT_TEAROFF)) *************** *** 3177,3183 **** } #endif if (need_set_size) ! gui_set_shellsize(FALSE, FALSE); } } --- 3187,3195 ---- } #endif if (need_set_size) ! /* Adjust the size of the window to avoid that part of our window ! * is off-screen and a scrollbar can't be used, for example. */ ! gui_set_shellsize(FALSE, fix_size); } } *** ../vim-6.2.267/src/version.c Tue Feb 17 21:08:58 2004 --- src/version.c Tue Feb 17 21:30:02 2004 *************** *** 639,640 **** --- 639,642 ---- { /* Add new patch number below this line */ + /**/ + 268, /**/ -- hundred-and-one symptoms of being an internet addict: 171. You invent another person and chat with yourself in empty chat rooms. /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ /// Sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ \\\ Project leader for A-A-P -- http://www.A-A-P.org /// \\\ Help AIDS victims, buy here: http://ICCF-Holland.org/click1.html ///