To: vim-dev@vim.org Subject: Patch 6.2.022 (extra) Fcc: outbox From: Bram Moolenaar Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 8bit ------------ Patch 6.2.022 (extra) Problem: Win32: After deleting a menu item it still appears in a tear-off window. Solution: Set the mode to zero for the deleted item. (Yasuhiro Matsumoto) Files: src/gui_w32.c *** ../vim-6.2.021/src/gui_w32.c Sun Jun 1 13:37:05 2003 --- src/gui_w32.c Sun Jun 22 17:13:50 2003 *************** *** 2012,2018 **** --- 2012,2022 ---- if (menu->parent != NULL && menu->parent->children != NULL && IsWindow(menu->parent->tearoff_handle)) + { + /* This menu must not show up when rebuilding the tearoff window. */ + menu->modes = 0; rebuild_tearoff(menu->parent); + } #endif } } *************** *** 3049,3054 **** --- 3054,3061 ---- for ( ; menu != NULL; menu = menu->next) { + if (menu->modes == 0) /* this menu has just been deleted */ + continue; if (menu_is_separator(menu->dname)) { sepPadding += 3; *** ../vim-6.2.021/src/version.c Sat Jul 5 19:20:12 2003 --- src/version.c Thu Jul 24 20:58:43 2003 *************** *** 632,633 **** --- 632,635 ---- { /* Add new patch number below this line */ + /**/ + 22, /**/ -- I am always surprised in the Linux world how quickly solutions can be obtained. (Imagine sending an email to Bill Gates, asking why Windows crashed, and how to fix it... and then getting an answer that fixed the problem... <0>_<0> !) -- Mark Langdon /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ /// Creator of Vim - Vi IMproved -- http://www.Vim.org \\\ \\\ Project leader for A-A-P -- http://www.A-A-P.org /// \\\ Help AIDS victims, buy here: http://ICCF-Holland.org/click1.html ///