073263
To: vim_dev@googlegroups.com
073263
Subject: Patch 7.4.601
073263
Fcc: outbox
073263
From: Bram Moolenaar <Bram@moolenaar.net>
073263
Mime-Version: 1.0
073263
Content-Type: text/plain; charset=UTF-8
073263
Content-Transfer-Encoding: 8bit
073263
------------
073263
073263
Patch 7.4.601
073263
Problem:    It is not possible to have feedkeys() insert characters.
073263
Solution:   Add the 'i' flag.
073263
Files:	    src/eval.c, runtime/doc/eval.txt
073263
073263
073263
*** ../vim-7.4.600/src/eval.c	2015-01-27 13:49:27.883049396 +0100
073263
--- src/eval.c	2015-01-27 15:13:01.928187370 +0100
073263
***************
073263
*** 10500,10505 ****
073263
--- 10500,10506 ----
073263
      typval_T    *rettv UNUSED;
073263
  {
073263
      int		remap = TRUE;
073263
+     int		insert = FALSE;
073263
      char_u	*keys, *flags;
073263
      char_u	nbuf[NUMBUFLEN];
073263
      int		typed = FALSE;
073263
***************
073263
*** 10524,10529 ****
073263
--- 10525,10531 ----
073263
  		    case 'n': remap = FALSE; break;
073263
  		    case 'm': remap = TRUE; break;
073263
  		    case 't': typed = TRUE; break;
073263
+ 		    case 'i': insert = TRUE; break;
073263
  		}
073263
  	    }
073263
  	}
073263
***************
073263
*** 10534,10540 ****
073263
  	if (keys_esc != NULL)
073263
  	{
073263
  	    ins_typebuf(keys_esc, (remap ? REMAP_YES : REMAP_NONE),
073263
! 					       typebuf.tb_len, !typed, FALSE);
073263
  	    vim_free(keys_esc);
073263
  	    if (vgetc_busy)
073263
  		typebuf_was_filled = TRUE;
073263
--- 10536,10542 ----
073263
  	if (keys_esc != NULL)
073263
  	{
073263
  	    ins_typebuf(keys_esc, (remap ? REMAP_YES : REMAP_NONE),
073263
! 				  insert ? 0 : typebuf.tb_len, !typed, FALSE);
073263
  	    vim_free(keys_esc);
073263
  	    if (vgetc_busy)
073263
  		typebuf_was_filled = TRUE;
073263
*** ../vim-7.4.600/runtime/doc/eval.txt	2014-11-27 19:14:45.080940970 +0100
073263
--- runtime/doc/eval.txt	2015-01-27 15:12:52.908285780 +0100
073263
***************
073263
*** 2957,2965 ****
073263
  
073263
  feedkeys({string} [, {mode}])				*feedkeys()*
073263
  		Characters in {string} are queued for processing as if they
073263
! 		come from a mapping or were typed by the user.	They are added
073263
! 		to the end of the typeahead buffer, thus if a mapping is still
073263
! 		being executed these characters come after them.
073263
  		The function does not wait for processing of keys contained in
073263
  		{string}.
073263
  		To include special keys into {string}, use double-quotes
073263
--- 2965,2976 ----
073263
  
073263
  feedkeys({string} [, {mode}])				*feedkeys()*
073263
  		Characters in {string} are queued for processing as if they
073263
! 		come from a mapping or were typed by the user.
073263
! 		By default the string is added to the end of the typeahead
073263
! 		buffer, thus if a mapping is still being executed the
073263
! 		characters come after them.  Use the 'i' flag to insert before
073263
! 		other characters, they will be executed next, before any
073263
! 		characters from a mapping.
073263
  		The function does not wait for processing of keys contained in
073263
  		{string}.
073263
  		To include special keys into {string}, use double-quotes
073263
***************
073263
*** 2973,2978 ****
073263
--- 2984,2990 ----
073263
  		't'	Handle keys as if typed; otherwise they are handled as
073263
  			if coming from a mapping.  This matters for undo,
073263
  			opening folds, etc.
073263
+ 		'i'	Insert the string instead of appending (see above).
073263
  		Return value is always 0.
073263
  
073263
  filereadable({file})					*filereadable()*
073263
*** ../vim-7.4.600/src/version.c	2015-01-27 14:54:07.944583588 +0100
073263
--- src/version.c	2015-01-27 15:15:35.290514092 +0100
073263
***************
073263
*** 743,744 ****
073263
--- 743,746 ----
073263
  {   /* Add new patch number below this line */
073263
+ /**/
073263
+     601,
073263
  /**/
073263
073263
-- 
073263
hundred-and-one symptoms of being an internet addict:
073263
127. You bring your laptop and cellular phone to church.
073263
073263
 /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net   \\\
073263
///        sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
073263
\\\  an exciting new programming language -- http://www.Zimbu.org        ///
073263
 \\\            help me help AIDS victims -- http://ICCF-Holland.org    ///