0
0
mirror of https://github.com/vim/vim.git synced 2025-09-27 04:14:06 -04:00

updated for version 7.3.753

Problem:    When there is a QuitPre autocommand using ":q" twice does not work
            for exiting when there are more files to edit.
Solution:   Do not decrement quitmore in an autocommand. (Techlive Zheng)
This commit is contained in:
Bram Moolenaar
2012-12-05 19:13:18 +01:00
parent 34feacbcce
commit 21691f896a
4 changed files with 7 additions and 3 deletions

View File

@@ -1729,11 +1729,13 @@ do_one_cmd(cmdlinep, sourcing,
++ex_nesting_level;
#endif
/* when not editing the last file :q has to be typed twice */
/* When the last file has not been edited :q has to be typed twice. */
if (quitmore
#ifdef FEAT_EVAL
/* avoid that a function call in 'statusline' does this */
&& !getline_equal(fgetline, cookie, get_func_line)
/* avoid that an autocommand, e.g. QuitPre, does this */
&& !getline_equal(fgetline, cookie, getnextac)
#endif
)
--quitmore;