Karsten Hopp f4c54c
To: vim_dev@googlegroups.com
Karsten Hopp f4c54c
Subject: Patch 7.3.519
Karsten Hopp f4c54c
Fcc: outbox
Karsten Hopp f4c54c
From: Bram Moolenaar <Bram@moolenaar.net>
Karsten Hopp f4c54c
Mime-Version: 1.0
Karsten Hopp f4c54c
Content-Type: text/plain; charset=UTF-8
Karsten Hopp f4c54c
Content-Transfer-Encoding: 8bit
Karsten Hopp f4c54c
------------
Karsten Hopp f4c54c
Karsten Hopp f4c54c
Patch 7.3.519
Karsten Hopp f4c54c
Problem:    When completefunction returns it cannot indicate end of completion
Karsten Hopp f4c54c
	    mode.
Karsten Hopp f4c54c
Solution:   Recognize completefunction returning -3.  (Mtsushita Shougo)
Karsten Hopp f4c54c
Files:	    src/edit.c
Karsten Hopp f4c54c
Karsten Hopp f4c54c
Karsten Hopp f4c54c
*** ../vim-7.3.518/src/edit.c	2012-04-30 18:18:43.000000000 +0200
Karsten Hopp f4c54c
--- src/edit.c	2012-05-18 16:35:06.000000000 +0200
Karsten Hopp f4c54c
***************
Karsten Hopp f4c54c
*** 5205,5213 ****
Karsten Hopp f4c54c
  	    }
Karsten Hopp f4c54c
  
Karsten Hopp f4c54c
  	    /* Return value -2 means the user complete function wants to
Karsten Hopp f4c54c
! 	     * cancel the complete without an error. */
Karsten Hopp f4c54c
  	    if (col == -2)
Karsten Hopp f4c54c
  		return FAIL;
Karsten Hopp f4c54c
  
Karsten Hopp f4c54c
  	    /*
Karsten Hopp f4c54c
  	     * Reset extended parameters of completion, when start new
Karsten Hopp f4c54c
--- 5205,5221 ----
Karsten Hopp f4c54c
  	    }
Karsten Hopp f4c54c
  
Karsten Hopp f4c54c
  	    /* Return value -2 means the user complete function wants to
Karsten Hopp f4c54c
! 	     * cancel the complete without an error.
Karsten Hopp f4c54c
! 	     * Return value -3 does the same as -2 and leaves CTRL-X mode.*/
Karsten Hopp f4c54c
  	    if (col == -2)
Karsten Hopp f4c54c
  		return FAIL;
Karsten Hopp f4c54c
+ 	    if (col == -3)
Karsten Hopp f4c54c
+ 	    {
Karsten Hopp f4c54c
+ 		ctrl_x_mode = 0;
Karsten Hopp f4c54c
+ 		edit_submode = NULL;
Karsten Hopp f4c54c
+ 		msg_clr_cmdline();
Karsten Hopp f4c54c
+ 		return FAIL;
Karsten Hopp f4c54c
+ 	    }
Karsten Hopp f4c54c
  
Karsten Hopp f4c54c
  	    /*
Karsten Hopp f4c54c
  	     * Reset extended parameters of completion, when start new
Karsten Hopp f4c54c
*** ../vim-7.3.518/src/version.c	2012-05-18 16:24:06.000000000 +0200
Karsten Hopp f4c54c
--- src/version.c	2012-05-18 16:34:27.000000000 +0200
Karsten Hopp f4c54c
***************
Karsten Hopp f4c54c
*** 716,717 ****
Karsten Hopp f4c54c
--- 716,719 ----
Karsten Hopp f4c54c
  {   /* Add new patch number below this line */
Karsten Hopp f4c54c
+ /**/
Karsten Hopp f4c54c
+     519,
Karsten Hopp f4c54c
  /**/
Karsten Hopp f4c54c
Karsten Hopp f4c54c
-- 
Karsten Hopp f4c54c
Looking at Perl through Lisp glasses, Perl looks atrocious.
Karsten Hopp f4c54c
Karsten Hopp f4c54c
 /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net   \\\
Karsten Hopp f4c54c
///        sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
Karsten Hopp f4c54c
\\\  an exciting new programming language -- http://www.Zimbu.org        ///
Karsten Hopp f4c54c
 \\\            help me help AIDS victims -- http://ICCF-Holland.org    ///