jkunstle / rpms / vim

Forked from rpms/vim 3 years ago
Clone
3ef2ca
To: vim_dev@googlegroups.com
3ef2ca
Subject: Patch 7.4.306
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.306
3ef2ca
Problem:    getchar(0) does not return Esc.
3ef2ca
Solution:   Do not wait for an Esc sequence to be complete.  (Yasuhiro
3ef2ca
	    Matsumoto)
3ef2ca
Files:	    src/eval.c, src/getchar.c
3ef2ca
3ef2ca
3ef2ca
*** ../vim-7.4.305/src/eval.c	2014-05-22 14:19:51.674510749 +0200
3ef2ca
--- src/eval.c	2014-05-22 18:59:34.038169656 +0200
3ef2ca
***************
3ef2ca
*** 11313,11325 ****
3ef2ca
  	    n = safe_vgetc();
3ef2ca
  	else if (get_tv_number_chk(&argvars[0], &error) == 1)
3ef2ca
  	    /* getchar(1): only check if char avail */
3ef2ca
! 	    n = vpeekc();
3ef2ca
! 	else if (error || vpeekc() == NUL)
3ef2ca
  	    /* illegal argument or getchar(0) and no char avail: return zero */
3ef2ca
  	    n = 0;
3ef2ca
  	else
3ef2ca
  	    /* getchar(0) and char avail: return char */
3ef2ca
  	    n = safe_vgetc();
3ef2ca
  	if (n == K_IGNORE)
3ef2ca
  	    continue;
3ef2ca
  	break;
3ef2ca
--- 11313,11326 ----
3ef2ca
  	    n = safe_vgetc();
3ef2ca
  	else if (get_tv_number_chk(&argvars[0], &error) == 1)
3ef2ca
  	    /* getchar(1): only check if char avail */
3ef2ca
! 	    n = vpeekc_any();
3ef2ca
! 	else if (error || vpeekc_any() == NUL)
3ef2ca
  	    /* illegal argument or getchar(0) and no char avail: return zero */
3ef2ca
  	    n = 0;
3ef2ca
  	else
3ef2ca
  	    /* getchar(0) and char avail: return char */
3ef2ca
  	    n = safe_vgetc();
3ef2ca
+ 
3ef2ca
  	if (n == K_IGNORE)
3ef2ca
  	    continue;
3ef2ca
  	break;
3ef2ca
*** ../vim-7.4.305/src/getchar.c	2014-03-23 15:12:29.919264336 +0100
3ef2ca
--- src/getchar.c	2014-05-22 18:34:13.450200562 +0200
3ef2ca
***************
3ef2ca
*** 1883,1889 ****
3ef2ca
  }
3ef2ca
  #endif
3ef2ca
  
3ef2ca
! #if defined(FEAT_INS_EXPAND) || defined(PROTO)
3ef2ca
  /*
3ef2ca
   * Check if any character is available, also half an escape sequence.
3ef2ca
   * Trick: when no typeahead found, but there is something in the typeahead
3ef2ca
--- 1883,1889 ----
3ef2ca
  }
3ef2ca
  #endif
3ef2ca
  
3ef2ca
! #if defined(FEAT_INS_EXPAND) || defined(FEAT_EVAL) || defined(PROTO)
3ef2ca
  /*
3ef2ca
   * Check if any character is available, also half an escape sequence.
3ef2ca
   * Trick: when no typeahead found, but there is something in the typeahead
3ef2ca
*** ../vim-7.4.305/src/version.c	2014-05-22 18:14:27.570224664 +0200
3ef2ca
--- src/version.c	2014-05-22 18:37:10.734196958 +0200
3ef2ca
***************
3ef2ca
*** 736,737 ****
3ef2ca
--- 736,739 ----
3ef2ca
  {   /* Add new patch number below this line */
3ef2ca
+ /**/
3ef2ca
+     306,
3ef2ca
  /**/
3ef2ca
3ef2ca
-- 
3ef2ca
Press any key to continue, press any other key to quit.
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    ///