Hi Bram!
On Sa, 16 Feb 2013, Bram Moolenaar wrote:
>
> Christian Brabandt wrote:
>
> > I think I've found a bug with the regular expression engine:
> >
> > ~$ vim -u NONE -N
> > :$put ='foobar'
> > :$put =''
> > :$put =''
> > :/foobar/
> > :call search('foobar', 'c')
> > " Note how the cursor /does not/ move
> > :+
> > :call search('^$', 'c')
> > " Note, that the cursor /moves/ one line down, although the 'c' flag is
> > " given and so the cursor should stay in its actual position
> > :call search('^$', 'bc')
> > " Note, that when searching backwards, the cursor /does not/ move as
> > " expected.
> >
> > Sorry for this brief explanation. I hope, you see the problem.
> > I am kind of busy currently, so I can't provide a detailed bug report or
> > a patch.
>
> I can reproduce it. I hope you can find a fix when you are not busy.
This patch fixes it for me:
diff --git a/src/search.c b/src/search.c
--- a/src/search.c
+++ b/src/search.c
@@ -727,6 +727,8 @@
++matchcol;
}
}
+ if (options & SEARCH_START)
+ break;
if (ptr[matchcol] == NUL
|| (nmatched = vim_regexec_multi(®match,
win, buf, lnum + matchpos.lnum,
Mit freundlichen Grüßen
Christian
--
Ich brauche das Alleinsein, um den Weg nach innen zu suchen.
-- Petter Moen
--
--
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 [email protected].
For more options, visit https://groups.google.com/groups/opt_out.