Blame SOURCES/7.4.601

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