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