68816Re: Patch 7.3.871
- Mar 23, 2013Sung Pae wrote:
> On Sat, Mar 23, 2013 at 04:31:42AM -0500, Sung Pae wrote:Thanks!
> > On Tue, Mar 19, 2013 at 03:28:07PM +0100, Bram Moolenaar wrote:
> > >
> > > 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
> > Unfortunately, this patch breaks forward searching with the SEARCH_START
> > flag set:
> > foo bar| baz " Cursor at |
> > :call search('.', 'c')
> > This places the cursor at column 1 instead of staying put as expected.
> > The problem is that simply breaking the column advance loop if
> > SEARCH_START is set will break all searches instead of just ones for the
> > empty line "^$".
> > Since matches at an empty line result in matchcol == 0, adding that to
> > the conditional fixes just that corner case without affecting all other
> > searches with the 'c' flag.
> > Simple patch is attached.
> > Sung Pae
> Actually attach patch.
Apparently the tests didn't catch this mistake. Would be nice to have a
test for this.
From "know your smileys":
(:-# Said something he shouldn't have
/// Bram Moolenaar -- Bram@... -- 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 ///
You received this message from the "vim_dev" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php
You received this message because you are subscribed to the Google Groups "vim_dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to vim_dev+unsubscribe@....
For more options, visit https://groups.google.com/groups/opt_out.
- << Previous post in topic Next post in topic >>