jkunstle / rpms / vim

Forked from rpms/vim 3 years ago
Clone
3ef2ca
To: vim_dev@googlegroups.com
3ef2ca
Subject: Patch 7.4.008
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.008
3ef2ca
Problem:    New regexp engine can't be interrupted.
3ef2ca
Solution:   Check for CTRL-C pressed. (Yasuhiro Matsumoto)
3ef2ca
Files:	    src/regexp_nfa.c, src/regexp.c
3ef2ca
3ef2ca
3ef2ca
*** ../vim-7.4.007/src/regexp_nfa.c	2013-08-14 14:18:37.000000000 +0200
3ef2ca
--- src/regexp_nfa.c	2013-08-25 16:55:56.000000000 +0200
3ef2ca
***************
3ef2ca
*** 5089,5094 ****
3ef2ca
--- 5089,5100 ----
3ef2ca
  	return FALSE;
3ef2ca
      }
3ef2ca
  #endif
3ef2ca
+     /* Some patterns may take a long time to match, especially when using
3ef2ca
+      * recursive_regmatch(). Allow interrupting them with CTRL-C. */
3ef2ca
+     fast_breakcheck();
3ef2ca
+     if (got_int)
3ef2ca
+ 	return FALSE;
3ef2ca
+ 
3ef2ca
      nfa_match = FALSE;
3ef2ca
  
3ef2ca
      /* Allocate memory for the lists of nodes. */
3ef2ca
*** ../vim-7.4.007/src/regexp.c	2013-08-01 18:31:30.000000000 +0200
3ef2ca
--- src/regexp.c	2013-08-25 16:57:35.000000000 +0200
3ef2ca
***************
3ef2ca
*** 4311,4318 ****
3ef2ca
     */
3ef2ca
    for (;;)
3ef2ca
    {
3ef2ca
!     /* Some patterns may cause a long time to match, even though they are not
3ef2ca
!      * illegal.  E.g., "\([a-z]\+\)\+Q".  Allow breaking them with CTRL-C. */
3ef2ca
      fast_breakcheck();
3ef2ca
  
3ef2ca
  #ifdef DEBUG
3ef2ca
--- 4311,4318 ----
3ef2ca
     */
3ef2ca
    for (;;)
3ef2ca
    {
3ef2ca
!     /* Some patterns may take a long time to match, e.g., "\([a-z]\+\)\+Q".
3ef2ca
!      * Allow interrupting them with CTRL-C. */
3ef2ca
      fast_breakcheck();
3ef2ca
  
3ef2ca
  #ifdef DEBUG
3ef2ca
*** ../vim-7.4.007/src/version.c	2013-08-22 14:14:23.000000000 +0200
3ef2ca
--- src/version.c	2013-08-25 16:57:51.000000000 +0200
3ef2ca
***************
3ef2ca
*** 729,730 ****
3ef2ca
--- 729,732 ----
3ef2ca
  {   /* Add new patch number below this line */
3ef2ca
+ /**/
3ef2ca
+     8,
3ef2ca
  /**/
3ef2ca
3ef2ca
-- 
3ef2ca
hundred-and-one symptoms of being an internet addict:
3ef2ca
124. You begin conversations with, "Who is your internet service provider?"
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    ///