| 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 |
| |
| |
| |
| |
| |
| *** 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; |
| } |
| |
| |
| |
| *** 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 /// |