changeset 3302:4500a0ad2e0a v7.3.418

updated for version 7.3.418 Problem: When a user complete function returns -1 an error message is given. Solution: When -2 is returned stop completion silently. (Yasuhiro Matsumoto)
author Bram Moolenaar <bram@vim.org>
date Thu, 26 Jan 2012 18:58:38 +0100
parents a30e19f222a5
children 64eab18b8a5b
files src/edit.c src/version.c
diffstat 2 files changed, 7 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/src/edit.c
+++ b/src/edit.c
@@ -5189,6 +5189,11 @@ ins_complete(c)
 		return FAIL;
 	    }
 
+	    /* Return value -2 means the user complete function wants to
+	     * cancel the complete without an error. */
+	    if (col == -2)
+		return FAIL;
+
 	    /*
 	     * Reset extended parameters of completion, when start new
 	     * completion.
--- 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 */
 /**/
+    418,
+/**/
     417,
 /**/
     416,