Hi.
I have an issue about QuitPre event.
[step]
1. Add following autocmd statements to .vimrc.
- autocmd QuitPre * call system('touch ~/quitpre.txt')
2. Open some file.
3. exec :wq or :qall.
[expected]
After step3, ~/quitpre.txt exists. ('autocmd QuitPre' is executed)
[actual]
After step3, ~/quitpre.txt DOESNOT exist.
[Version]
version 7.3.843
And I've created the patch. Could you check it?
diff -r ad7bbe9ea65b -r f869a6b1de57 src/ex_docmd.c
--- a/src/ex_docmd.c Tue Feb 26 22:54:11 2013 +0100
+++ b/src/ex_docmd.c Sun Mar 03 16:30:08 2013 +0900
@@ -6600,7 +6600,10 @@
return;
}
#ifdef FEAT_AUTOCMD
- if (curbuf_locked())
+ apply_autocmds(EVENT_QUITPRE, NULL, NULL, FALSE, curbuf);
+ /* Refuse to quick when locked or when the buffer in the last window is
+ * being closed (can only happen in autocommands). */
+ if (curbuf_locked() || (curbuf->b_nwindows == 1 && curbuf->b_closing))
return;
#endif
@@ -6936,7 +6939,10 @@
return;
}
#ifdef FEAT_AUTOCMD
- if (curbuf_locked())
+ apply_autocmds(EVENT_QUITPRE, NULL, NULL, FALSE, curbuf);
+ /* Refuse to quick when locked or when the buffer in the last window is
+ * being closed (can only happen in autocommands). */
+ if (curbuf_locked() || (curbuf->b_nwindows == 1 && curbuf->b_closing))
return;
#endif
Best.
--
Tatsuro Fujii
[email protected]
--
--
You received this message from the "vim_dev" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php
---
You received this message because you are subscribed to the Google Groups
"vim_dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
For more options, visit https://groups.google.com/groups/opt_out.