1 To: vim_dev@googlegroups.com
4 From: Bram Moolenaar <Bram@moolenaar.net>
6 Content-Type: text/plain; charset=UTF-8
7 Content-Transfer-Encoding: 8bit
11 Problem: Cannot act upon end of completion. (Taro Muraoka)
12 Solution: Add an autocommand event that is triggered when completion has
13 finished. (Idea by Florian Klein)
14 Files: src/edit.c, src/fileio.c, src/vim.h
17 *** ../vim-7.3.597/src/edit.c 2012-07-06 13:36:36.000000000 +0200
18 --- src/edit.c 2012-07-10 17:02:37.000000000 +0200
22 if (want_cindent && in_cinkeys(KEY_COMPLETE, ' ', inindent(0)))
26 + /* Trigger the CompleteDone event to give scripts a chance to act
27 + * upon the completion. */
28 + apply_autocmds(EVENT_COMPLETEDONE, NULL, NULL, FALSE, curbuf);
33 *** ../vim-7.3.597/src/fileio.c 2012-06-13 14:28:16.000000000 +0200
34 --- src/fileio.c 2012-07-10 17:05:51.000000000 +0200
38 {"CmdwinEnter", EVENT_CMDWINENTER},
39 {"CmdwinLeave", EVENT_CMDWINLEAVE},
40 {"ColorScheme", EVENT_COLORSCHEME},
41 + {"CompleteDone", EVENT_COMPLETEDONE},
42 {"CursorHold", EVENT_CURSORHOLD},
43 {"CursorHoldI", EVENT_CURSORHOLDI},
44 {"CursorMoved", EVENT_CURSORMOVED},
45 *** ../vim-7.3.597/src/vim.h 2012-07-10 13:41:09.000000000 +0200
46 --- src/vim.h 2012-07-10 17:06:24.000000000 +0200
50 EVENT_CMDWINENTER, /* after entering the cmdline window */
51 EVENT_CMDWINLEAVE, /* before leaving the cmdline window */
52 EVENT_COLORSCHEME, /* after loading a colorscheme */
53 + EVENT_COMPLETEDONE, /* after finishing insert complete */
54 EVENT_FILEAPPENDPOST, /* after appending to a file */
55 EVENT_FILEAPPENDPRE, /* before appending to a file */
56 EVENT_FILEAPPENDCMD, /* append to a file using command */
57 *** ../vim-7.3.597/src/version.c 2012-07-10 16:49:08.000000000 +0200
58 --- src/version.c 2012-07-10 17:08:41.000000000 +0200
62 { /* Add new patch number below this line */
68 Laughing helps. It's like jogging on the inside.
70 /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\
71 /// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
72 \\\ an exciting new programming language -- http://www.Zimbu.org ///
73 \\\ help me help AIDS victims -- http://ICCF-Holland.org ///