From 381552e2cdad6ee0c38bdd75544dce706e63a472 Mon Sep 17 00:00:00 2001 From: edyfox Date: Fri, 16 Mar 2007 03:25:51 +0000 Subject: [PATCH] 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 git-svn-id: https://vim.svn.sourceforge.net/svnroot/vim/vim7@235 2a77ed30-b011-0410-a7ad-c7884a0aa172 --- src/ex_cmds.c | 5 +++-- src/version.c | 2 ++ 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/src/ex_cmds.c b/src/ex_cmds.c index 80ac3f98..ffd90a13 100644 --- a/src/ex_cmds.c +++ b/src/ex_cmds.c @@ -4677,11 +4677,12 @@ do_sub(eap) /* 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. */ + * Avoids that ":%s/\nB\@=//gc" and ":%s/\n/,\r/gc" + * get stuck when pressing 'n'. */ if (nmatch > 1) { matchcol = (colnr_T)STRLEN(sub_firstline); - nmatch = 1; + skip_match = TRUE; } goto skip; } diff --git a/src/version.c b/src/version.c index 1517d0a1..b248fc35 100644 --- a/src/version.c +++ b/src/version.c @@ -667,6 +667,8 @@ static char *(features[]) = static int included_patches[] = { /* Add new patch number below this line */ /**/ + 217, +/**/ 216, /**/ 215, -- 2.11.4.GIT