Fix confusing behavior in search when changing directions (bug 8543)

This commit is contained in:
Jean-Marc Lasgouttes 2013-02-22 11:06:25 +01:00
parent 6c03b1ff74
commit 0082d183b3

View File

@ -154,7 +154,9 @@ bool findOne(BufferView * bv, docstring const & searchstr,
if (!searchAllowed(searchstr)) if (!searchAllowed(searchstr))
return false; return false;
DocIterator cur = bv->cursor(); DocIterator cur = forward
? bv->cursor().selectionEnd()
: bv->cursor().selectionBegin();
MatchString const match(searchstr, case_sens, whole); MatchString const match(searchstr, case_sens, whole);