astepano / rpms / vim

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