Karsten Hopp fdd38c
To: vim_dev@googlegroups.com
Karsten Hopp fdd38c
Subject: Patch 7.4.008
Karsten Hopp fdd38c
Fcc: outbox
Karsten Hopp fdd38c
From: Bram Moolenaar <Bram@moolenaar.net>
Karsten Hopp fdd38c
Mime-Version: 1.0
Karsten Hopp fdd38c
Content-Type: text/plain; charset=UTF-8
Karsten Hopp fdd38c
Content-Transfer-Encoding: 8bit
Karsten Hopp fdd38c
------------
Karsten Hopp fdd38c
Karsten Hopp fdd38c
Patch 7.4.008
Karsten Hopp fdd38c
Problem:    New regexp engine can't be interrupted.
Karsten Hopp fdd38c
Solution:   Check for CTRL-C pressed. (Yasuhiro Matsumoto)
Karsten Hopp fdd38c
Files:	    src/regexp_nfa.c, src/regexp.c
Karsten Hopp fdd38c
Karsten Hopp fdd38c
Karsten Hopp fdd38c
*** ../vim-7.4.007/src/regexp_nfa.c	2013-08-14 14:18:37.000000000 +0200
Karsten Hopp fdd38c
--- src/regexp_nfa.c	2013-08-25 16:55:56.000000000 +0200
Karsten Hopp fdd38c
***************
Karsten Hopp fdd38c
*** 5089,5094 ****
Karsten Hopp fdd38c
--- 5089,5100 ----
Karsten Hopp fdd38c
  	return FALSE;
Karsten Hopp fdd38c
      }
Karsten Hopp fdd38c
  #endif
Karsten Hopp fdd38c
+     /* Some patterns may take a long time to match, especially when using
Karsten Hopp fdd38c
+      * recursive_regmatch(). Allow interrupting them with CTRL-C. */
Karsten Hopp fdd38c
+     fast_breakcheck();
Karsten Hopp fdd38c
+     if (got_int)
Karsten Hopp fdd38c
+ 	return FALSE;
Karsten Hopp fdd38c
+ 
Karsten Hopp fdd38c
      nfa_match = FALSE;
Karsten Hopp fdd38c
  
Karsten Hopp fdd38c
      /* Allocate memory for the lists of nodes. */
Karsten Hopp fdd38c
*** ../vim-7.4.007/src/regexp.c	2013-08-01 18:31:30.000000000 +0200
Karsten Hopp fdd38c
--- src/regexp.c	2013-08-25 16:57:35.000000000 +0200
Karsten Hopp fdd38c
***************
Karsten Hopp fdd38c
*** 4311,4318 ****
Karsten Hopp fdd38c
     */
Karsten Hopp fdd38c
    for (;;)
Karsten Hopp fdd38c
    {
Karsten Hopp fdd38c
!     /* Some patterns may cause a long time to match, even though they are not
Karsten Hopp fdd38c
!      * illegal.  E.g., "\([a-z]\+\)\+Q".  Allow breaking them with CTRL-C. */
Karsten Hopp fdd38c
      fast_breakcheck();
Karsten Hopp fdd38c
  
Karsten Hopp fdd38c
  #ifdef DEBUG
Karsten Hopp fdd38c
--- 4311,4318 ----
Karsten Hopp fdd38c
     */
Karsten Hopp fdd38c
    for (;;)
Karsten Hopp fdd38c
    {
Karsten Hopp fdd38c
!     /* Some patterns may take a long time to match, e.g., "\([a-z]\+\)\+Q".
Karsten Hopp fdd38c
!      * Allow interrupting them with CTRL-C. */
Karsten Hopp fdd38c
      fast_breakcheck();
Karsten Hopp fdd38c
  
Karsten Hopp fdd38c
  #ifdef DEBUG
Karsten Hopp fdd38c
*** ../vim-7.4.007/src/version.c	2013-08-22 14:14:23.000000000 +0200
Karsten Hopp fdd38c
--- src/version.c	2013-08-25 16:57:51.000000000 +0200
Karsten Hopp fdd38c
***************
Karsten Hopp fdd38c
*** 729,730 ****
Karsten Hopp fdd38c
--- 729,732 ----
Karsten Hopp fdd38c
  {   /* Add new patch number below this line */
Karsten Hopp fdd38c
+ /**/
Karsten Hopp fdd38c
+     8,
Karsten Hopp fdd38c
  /**/
Karsten Hopp fdd38c
Karsten Hopp fdd38c
-- 
Karsten Hopp fdd38c
hundred-and-one symptoms of being an internet addict:
Karsten Hopp fdd38c
124. You begin conversations with, "Who is your internet service provider?"
Karsten Hopp fdd38c
Karsten Hopp fdd38c
 /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net   \\\
Karsten Hopp fdd38c
///        sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
Karsten Hopp fdd38c
\\\  an exciting new programming language -- http://www.Zimbu.org        ///
Karsten Hopp fdd38c
 \\\            help me help AIDS victims -- http://ICCF-Holland.org    ///