From 0082d183b34551fb63251f7e703429c87247328d Mon Sep 17 00:00:00 2001 From: Jean-Marc Lasgouttes Date: Fri, 22 Feb 2013 11:06:25 +0100 Subject: [PATCH] Fix confusing behavior in search when changing directions (bug 8543) --- src/lyxfind.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/lyxfind.cpp b/src/lyxfind.cpp index 73700cb4fc..d6df0ef780 100644 --- a/src/lyxfind.cpp +++ b/src/lyxfind.cpp @@ -154,7 +154,9 @@ bool findOne(BufferView * bv, docstring const & searchstr, if (!searchAllowed(searchstr)) return false; - DocIterator cur = bv->cursor(); + DocIterator cur = forward + ? bv->cursor().selectionEnd() + : bv->cursor().selectionBegin(); MatchString const match(searchstr, case_sens, whole); -- 2.39.5