diff options
author | Bram Moolenaar <bram@vim.org> | 2012-05-18 16:35:21 +0200 |
---|---|---|
committer | Bram Moolenaar <bram@vim.org> | 2012-05-18 16:35:21 +0200 |
commit | 964a7c7974a630a90ad37340606840e014432a5f (patch) | |
tree | 63307a995f3381a4524e1f9838b21b674e20c2b7 | |
parent | 7533500bce692aafbbddae0a94bfc4f4fa24aa2e (diff) | |
download | vim-964a7c7974a630a90ad37340606840e014432a5f.tar.gz |
Problem: When completefunction returns it cannot indicate end of completion
mode.
Solution: Recognize completefunction returning -3. (Mtsushita Shougo)
-rw-r--r-- | src/edit.c | 10 | ||||
-rw-r--r-- | src/version.c | 2 |
2 files changed, 11 insertions, 1 deletions
@@ -5205,9 +5205,17 @@ ins_complete(c) } /* Return value -2 means the user complete function wants to - * cancel the complete without an error. */ + * cancel the complete without an error. + * Return value -3 does the same as -2 and leaves CTRL-X mode.*/ if (col == -2) return FAIL; + if (col == -3) + { + ctrl_x_mode = 0; + edit_submode = NULL; + msg_clr_cmdline(); + return FAIL; + } /* * Reset extended parameters of completion, when start new diff --git a/src/version.c b/src/version.c index b05c8434..accf0b9b 100644 --- a/src/version.c +++ b/src/version.c @@ -715,6 +715,8 @@ static char *(features[]) = static int included_patches[] = { /* Add new patch number below this line */ /**/ + 519, +/**/ 518, /**/ 517, |