To: vim-dev@vim.org Subject: Patch 6.2.424 Fcc: outbox From: Bram Moolenaar Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 8bit ------------ Patch 6.2.424 Problem: A BufEnter autocommand that sets an option stops 'mousefocus' from working in Insert mode (Normal mode is OK). (Gregory Seidman) Solution: In the Insert mode loop invoke gui_mouse_correct() when needed. Files: src/edit.c *** ../vim-6.2.423/src/edit.c Thu Apr 1 12:24:58 2004 --- src/edit.c Thu Apr 1 14:15:37 2004 *************** *** 516,521 **** --- 516,529 ---- */ msg_scroll = FALSE; + #ifdef FEAT_GUI + /* When 'mousefocus' is set a mouse movement may have taken us to + * another window. "need_mouse_correct" may then be set because of an + * autocommand. */ + if (need_mouse_correct) + gui_mouse_correct(); + #endif + #ifdef FEAT_FOLDING /* Open fold at the cursor line, according to 'foldopen'. */ if (fdo_flags & FDO_INSERT) *** ../vim-6.2.423/src/version.c Thu Apr 1 13:01:12 2004 --- src/version.c Thu Apr 1 14:19:12 2004 *************** *** 639,640 **** --- 639,642 ---- { /* Add new patch number below this line */ + /**/ + 424, /**/ -- hundred-and-one symptoms of being an internet addict: 222. You send more than 20 personal e-mails a day. /// 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 /// \\\ Buy at Amazon and help AIDS victims -- http://ICCF.nl/click1.html ///