| To: vim_dev@googlegroups.com |
| Subject: Patch 7.3.871 |
| Fcc: outbox |
| From: Bram Moolenaar <Bram@moolenaar.net> |
| Mime-Version: 1.0 |
| Content-Type: text/plain; charset=UTF-8 |
| Content-Transfer-Encoding: 8bit |
| |
| |
| Patch 7.3.871 |
| Problem: search('^$', 'c') does not use the empty match under the cursor. |
| Solution: Special handling of the 'c' flag. (Christian Brabandt) |
| Add tests. |
| Files: src/search.c, src/testdir/test14.in, src/testdir/test14.ok |
| |
| |
| |
| |
| |
| *** 727,732 **** |
| --- 727,734 ---- |
| ++matchcol; |
| } |
| } |
| + if (options & SEARCH_START) |
| + break; |
| if (ptr[matchcol] == NUL |
| || (nmatched = vim_regexec_multi(®match, |
| win, buf, lnum + matchpos.lnum, |
| |
| |
| |
| *** 2,7 **** |
| --- 2,8 ---- |
| Also test ":s/pat/sub/" with different ~s in sub. |
| Also test for ^Vxff and ^Vo123 in Insert mode. |
| Also test "[m", "]m", "[M" and "]M" |
| + Also test search() |
| |
| STARTTEST |
| :so small.vim |
| |
| *** 34,39 **** |
| --- 35,50 ---- |
| 2[MaJ:.w >>test.out |
| k[MaK:.w >>test.out |
| 3[MaL:.w >>test.out |
| + :" |
| + /^foobar |
| + :let startline = line('.') |
| + :call search('foobar', 'c') |
| + :call append(line('$'), line('.') - startline) |
| + j:call search('^$', 'c') |
| + :call append(line('$'), line('.') - startline) |
| + :call search('^$', 'bc') |
| + :call append(line('$'), line('.') - startline) |
| + :/^search()/,$w >>test.out |
| :qa! |
| ENDTEST |
| |
| |
| *** 64,66 **** |
| --- 75,82 ---- |
| } |
| } e3 |
| } |
| + |
| + foobar |
| + |
| + |
| + search() |
| |
| |
| |
| *** 15,17 **** |
| --- 15,21 ---- |
| }JH e3 |
| }K e2 |
| {LF |
| + search() |
| + 0 |
| + 1 |
| + 1 |
| |
| |
| |
| *** 730,731 **** |
| --- 730,733 ---- |
| { /* Add new patch number below this line */ |
| + /**/ |
| + 871, |
| /**/ |
| |
| -- |
| hundred-and-one symptoms of being an internet addict: |
| 75. You start wondering whether you could actually upgrade your brain |
| with a Pentium Pro microprocessor 80. The upgrade works just fine. |
| |
| /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ |
| /// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ |
| \\\ an exciting new programming language -- http://www.Zimbu.org /// |
| \\\ help me help AIDS victims -- http://ICCF-Holland.org /// |