To: vim-dev@vim.org
Subject: patch 7.0.217
Fcc: outbox
From: Bram Moolenaar <Bram@moolenaar.net>
Mime-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: 8bit
------------
Patch 7.0.217
Problem: This hangs when pressing "n": ":%s/\n/,\r/gc". (Ori Avtalion)
Solution: Set "skip_match" to advance to the next line.
Files: src/ex_cmds.c
*** ../vim-7.0.216/src/ex_cmds.c Tue Feb 27 16:51:07 2007
--- src/ex_cmds.c Thu Mar 15 21:31:35 2007
***************
*** 4677,4687 ****
/* For a multi-line match, put matchcol at the NUL at
* the end of the line and set nmatch to one, so that
* we continue looking for a match on the next line.
! * Avoids that ":s/\nB\@=//gc" get stuck. */
if (nmatch > 1)
{
matchcol = (colnr_T)STRLEN(sub_firstline);
! nmatch = 1;
}
goto skip;
}
--- 4677,4688 ----
/* For a multi-line match, put matchcol at the NUL at
* the end of the line and set nmatch to one, so that
* we continue looking for a match on the next line.
! * Avoids that ":%s/\nB\@=//gc" and ":%s/\n/,\r/gc"
! * get stuck when pressing 'n'. */
if (nmatch > 1)
{
matchcol = (colnr_T)STRLEN(sub_firstline);
! skip_match = TRUE;
}
goto skip;
}
*** ../vim-7.0.216/src/version.c Sun Mar 11 15:53:27 2007
--- src/version.c Thu Mar 15 21:36:34 2007
***************
*** 668,669 ****
--- 668,671 ----
{ /* Add new patch number below this line */
+ /**/
+ 217,
/**/
--
A mathematician is a device for turning coffee into theorems.
Paul Erdos
A computer programmer is a device for turning coffee into bugs.
Bram Moolenaar
/// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\
/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
\\\ download, build and distribute -- http://www.A-A-P.org ///
\\\ help me help AIDS victims -- http://ICCF-Holland.org ///