Mercurial > vim
diff src/ex_docmd.c @ 3997:c83cd3d01128 v7.3.753
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)
author | Bram Moolenaar <bram@vim.org> |
---|---|
date | Wed, 05 Dec 2012 19:13:18 +0100 |
parents | 67e3b2753a6e |
children | 36fd800b8c6c |
line wrap: on
line diff
--- a/src/ex_docmd.c +++ b/src/ex_docmd.c @@ -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;