To: vim-dev@vim.org Subject: Patch 6.2.259 Fcc: outbox From: Bram Moolenaar Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 8bit ------------ Patch 6.2.259 Problem: If there are messages when exiting, on the console there is a hit-enter prompt while the message can be read; in the GUI the message may not be visible. Solution: Use the hit-enter prompt when there is an error message from writing the viminfo file or autocommands, or when there is any output in the GUI and 'verbose' is set. Don't use a hit-enter prompt for the non-GUI version unless there is an error message. Files: src/main.c *** ../vim-6.2.258/src/main.c Sun Feb 8 17:09:51 2004 --- src/main.c Thu Feb 12 15:23:40 2004 *************** *** 2185,2190 **** --- 2193,2202 ---- #endif windgoto((int)Rows - 1, 0); + #ifdef FEAT_GUI + msg_didany = FALSE; + #endif + #ifdef FEAT_AUTOCMD /* Trigger BufWinLeave for all windows, but only once per buffer. */ for (wp = firstwin; wp != NULL; ) *************** *** 2214,2234 **** #ifdef FEAT_VIMINFO if (*p_viminfo != NUL) - { /* Write out the registers, history, marks etc, to the viminfo file */ - msg_didany = FALSE; write_viminfo(NULL, FALSE); ! if (msg_didany) /* make the user read the error message */ ! { ! no_wait_return = FALSE; ! wait_return(FALSE); ! } ! } ! #endif /* FEAT_VIMINFO */ #ifdef FEAT_AUTOCMD apply_autocmds(EVENT_VIMLEAVE, NULL, NULL, FALSE, curbuf); /* Position the cursor again, the autocommands may have moved it */ # ifdef FEAT_GUI if (!gui.in_use) --- 2226,2251 ---- #ifdef FEAT_VIMINFO if (*p_viminfo != NUL) /* Write out the registers, history, marks etc, to the viminfo file */ write_viminfo(NULL, FALSE); ! #endif #ifdef FEAT_AUTOCMD apply_autocmds(EVENT_VIMLEAVE, NULL, NULL, FALSE, curbuf); + #endif + + if (did_emsg + #ifdef FEAT_GUI + || (gui.in_use && msg_didany && p_verbose > 0) + #endif + ) + { + /* give the user a chance to read the (error) message */ + no_wait_return = FALSE; + wait_return(FALSE); + } + #ifdef FEAT_AUTOCMD /* Position the cursor again, the autocommands may have moved it */ # ifdef FEAT_GUI if (!gui.in_use) *** ../vim-6.2.258/src/version.c Sun Feb 15 13:33:50 2004 --- src/version.c Sun Feb 15 13:35:15 2004 *************** *** 639,640 **** --- 639,642 ---- { /* Add new patch number below this line */ + /**/ + 259, /**/ -- hundred-and-one symptoms of being an internet addict: 145. You e-mail your boss, informing him you'll be late. /// 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 ///