jkunstle / rpms / vim

Forked from rpms/vim 3 years ago
Clone

Blame SOURCES/7.4.601

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