To: vim-dev@vim.org Subject: Patch 6.2.091 Fcc: outbox From: Bram Moolenaar Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 8bit ------------ Patch 6.2.091 Problem: When an autocommand is triggered when a file is dropped on Vim and it produces output, messages from a following command may be scrolled unexpectedly. (David Rennalls) Solution: Save and restore msg_scroll in handle_drop(). Files: src/ex_docmd.c *** ../vim-6.2.090/src/ex_docmd.c Wed Sep 10 22:41:46 2003 --- src/ex_docmd.c Sun Sep 7 14:26:29 2003 *************** *** 5682,5692 **** int split; /* force splitting the window */ { exarg_T ea; ! #ifdef FEAT_CMDWIN if (cmdwin_type != 0) return; ! #endif /* Check whether the current buffer is changed. If so, we will need * to split the current window or data could be lost. --- 5684,5695 ---- int split; /* force splitting the window */ { exarg_T ea; + int save_msg_scroll = msg_scroll; ! # ifdef FEAT_CMDWIN if (cmdwin_type != 0) return; ! # endif /* Check whether the current buffer is changed. If so, we will need * to split the current window or data could be lost. *************** *** 5735,5740 **** --- 5742,5752 ---- /* do_ecmd() may set need_start_insertmode, but since we never left Insert * mode that is not needed here. */ need_start_insertmode = FALSE; + + /* Restore msg_scroll, otherwise a following command may cause scrolling + * unexpectedly. The screen will be redrawn by the caller, thus + * msg_scroll being set by displaying a message is irrelevant. */ + msg_scroll = save_msg_scroll; } #endif *** ../vim-6.2.090/src/version.c Thu Sep 11 21:50:44 2003 --- src/version.c Fri Sep 12 19:49:12 2003 *************** *** 632,633 **** --- 632,635 ---- { /* Add new patch number below this line */ + /**/ + 91, /**/ -- Why is "abbreviation" such a long word? /// 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 ///