diff -r 2cfb68fa26cd runtime/doc/insert.txt
--- a/runtime/doc/insert.txt	Wed Mar 28 20:51:51 2012 +0200
+++ b/runtime/doc/insert.txt	Mon Apr 02 08:15:37 2012 +0900
@@ -1011,7 +1011,7 @@
 could be part of the completed item.  The text between this column and the
 cursor column will be replaced with the matches.  Return -1 if no completion
 can be done, the completion will be cancelled with an error message.  Return
--2 to cancel silently.
+-2 to cancel silently. Return -3 to cancel silently and leave completion mode.
 
 On the second invocation the arguments are:
    a:findstart  0
diff -r 2cfb68fa26cd src/edit.c
--- a/src/edit.c	Wed Mar 28 20:51:51 2012 +0200
+++ b/src/edit.c	Mon Apr 02 08:15:37 2012 +0900
@@ -5203,9 +5203,16 @@
 	    }
 
 	    /* 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 same to -2 and leave ctrl x mode.*/
 	    if (col == -2)
 		return FAIL;
+	    else if (col == -3) {
+		ctrl_x_mode = 0;
+		edit_submode = NULL;
+		msg_clr_cmdline();
+		return FAIL;
+	    }
 
 	    /*
 	     * Reset extended parameters of completion, when start new