jkunstle / rpms / vim

Forked from rpms/vim 3 years ago
Clone

Blame SOURCES/7.4.008

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