astepano / rpms / vim

Forked from rpms/vim 6 years ago
Clone
f2b2f26
To: vim_dev@googlegroups.com
f2b2f26
Subject: Patch 7.4.306
f2b2f26
Fcc: outbox
f2b2f26
From: Bram Moolenaar <Bram@moolenaar.net>
f2b2f26
Mime-Version: 1.0
f2b2f26
Content-Type: text/plain; charset=UTF-8
f2b2f26
Content-Transfer-Encoding: 8bit
f2b2f26
------------
f2b2f26
f2b2f26
Patch 7.4.306
f2b2f26
Problem:    getchar(0) does not return Esc.
f2b2f26
Solution:   Do not wait for an Esc sequence to be complete.  (Yasuhiro
f2b2f26
	    Matsumoto)
f2b2f26
Files:	    src/eval.c, src/getchar.c
f2b2f26
f2b2f26
f2b2f26
*** ../vim-7.4.305/src/eval.c	2014-05-22 14:19:51.674510749 +0200
f2b2f26
--- src/eval.c	2014-05-22 18:59:34.038169656 +0200
f2b2f26
***************
f2b2f26
*** 11313,11325 ****
f2b2f26
  	    n = safe_vgetc();
f2b2f26
  	else if (get_tv_number_chk(&argvars[0], &error) == 1)
f2b2f26
  	    /* getchar(1): only check if char avail */
f2b2f26
! 	    n = vpeekc();
f2b2f26
! 	else if (error || vpeekc() == NUL)
f2b2f26
  	    /* illegal argument or getchar(0) and no char avail: return zero */
f2b2f26
  	    n = 0;
f2b2f26
  	else
f2b2f26
  	    /* getchar(0) and char avail: return char */
f2b2f26
  	    n = safe_vgetc();
f2b2f26
  	if (n == K_IGNORE)
f2b2f26
  	    continue;
f2b2f26
  	break;
f2b2f26
--- 11313,11326 ----
f2b2f26
  	    n = safe_vgetc();
f2b2f26
  	else if (get_tv_number_chk(&argvars[0], &error) == 1)
f2b2f26
  	    /* getchar(1): only check if char avail */
f2b2f26
! 	    n = vpeekc_any();
f2b2f26
! 	else if (error || vpeekc_any() == NUL)
f2b2f26
  	    /* illegal argument or getchar(0) and no char avail: return zero */
f2b2f26
  	    n = 0;
f2b2f26
  	else
f2b2f26
  	    /* getchar(0) and char avail: return char */
f2b2f26
  	    n = safe_vgetc();
f2b2f26
+ 
f2b2f26
  	if (n == K_IGNORE)
f2b2f26
  	    continue;
f2b2f26
  	break;
f2b2f26
*** ../vim-7.4.305/src/getchar.c	2014-03-23 15:12:29.919264336 +0100
f2b2f26
--- src/getchar.c	2014-05-22 18:34:13.450200562 +0200
f2b2f26
***************
f2b2f26
*** 1883,1889 ****
f2b2f26
  }
f2b2f26
  #endif
f2b2f26
  
f2b2f26
! #if defined(FEAT_INS_EXPAND) || defined(PROTO)
f2b2f26
  /*
f2b2f26
   * Check if any character is available, also half an escape sequence.
f2b2f26
   * Trick: when no typeahead found, but there is something in the typeahead
f2b2f26
--- 1883,1889 ----
f2b2f26
  }
f2b2f26
  #endif
f2b2f26
  
f2b2f26
! #if defined(FEAT_INS_EXPAND) || defined(FEAT_EVAL) || defined(PROTO)
f2b2f26
  /*
f2b2f26
   * Check if any character is available, also half an escape sequence.
f2b2f26
   * Trick: when no typeahead found, but there is something in the typeahead
f2b2f26
*** ../vim-7.4.305/src/version.c	2014-05-22 18:14:27.570224664 +0200
f2b2f26
--- src/version.c	2014-05-22 18:37:10.734196958 +0200
f2b2f26
***************
f2b2f26
*** 736,737 ****
f2b2f26
--- 736,739 ----
f2b2f26
  {   /* Add new patch number below this line */
f2b2f26
+ /**/
f2b2f26
+     306,
f2b2f26
  /**/
f2b2f26
f2b2f26
-- 
f2b2f26
Press any key to continue, press any other key to quit.
f2b2f26
f2b2f26
 /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net   \\\
f2b2f26
///        sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
f2b2f26
\\\  an exciting new programming language -- http://www.Zimbu.org        ///
f2b2f26
 \\\            help me help AIDS victims -- http://ICCF-Holland.org    ///