Hello list,
I'd like to see autocommands like CompleteFuncOk that are dispatched
when a choice had been made in the complete list and insterted.
I've decided to dive into the code and arrived with this patch. Do you
think it's ok ?
Should I take a different approach ?
Many thanks,
Florian.
# ACL - Uncomment this when you do not want to include ACL support,
even
# though your system does support it. E.g., when it's buggy.
diff -r 749c0a60b745 src/edit.c
--- a/src/edit.c Thu Dec 01 20:59:21 2011 +0100
+++ b/src/edit.c Tue Jan 31 18:05:46 2012 +0100
@@ -5462,6 +5462,8 @@
compl_was_interrupted = compl_interrupted;
compl_interrupted = FALSE;
+ apply_autocmds(EVENT_COMPLETEFUNCOK, NULL, NULL, FALSE, curbuf);
+
return OK;
}
diff -r 749c0a60b745 src/fileio.c
--- a/src/fileio.c Thu Dec 01 20:59:21 2011 +0100
+++ b/src/fileio.c Tue Jan 31 18:05:46 2012 +0100
@@ -7702,6 +7702,7 @@
{"WinEnter", EVENT_WINENTER},
{"WinLeave", EVENT_WINLEAVE},
{"VimResized", EVENT_VIMRESIZED},
+ {"CompleteFuncOk", EVENT_COMPLETEFUNCOK},
{NULL, (event_T)0}
};
diff -r 749c0a60b745 src/vim.h
--- a/src/vim.h Thu Dec 01 20:59:21 2011 +0100
+++ b/src/vim.h Tue Jan 31 18:05:46 2012 +0100
@@ -1293,6 +1293,7 @@
EVENT_TABENTER, /* after entering a tab page */
EVENT_SHELLCMDPOST, /* after ":!cmd" */
EVENT_SHELLFILTERPOST, /* after ":1,2!cmd", ":w !cmd", ":r !
cmd". */
+ EVENT_COMPLETEFUNCOK, /* after completefunc is success. */
NUM_EVENTS /* MUST be the last one */
};
--
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