From: Tommaso Cucinotta Date: Wed, 3 Apr 2013 23:43:36 +0000 (+0100) Subject: Fixed issue #8543 also for advanced search (cursor moved at proper end of selection... X-Git-Tag: 2.0.6~21 X-Git-Url: https://git.lyx.org/gitweb/?a=commitdiff_plain;h=1129eb0342ba2497e2ff7c41587917cef6111465;p=features.git Fixed issue #8543 also for advanced search (cursor moved at proper end of selection before starting Find Advanced operation). --- diff --git a/src/lyxfind.cpp b/src/lyxfind.cpp index a81e293fc2..a4ae870930 100644 --- a/src/lyxfind.cpp +++ b/src/lyxfind.cpp @@ -1422,6 +1422,9 @@ bool findAdv(BufferView * bv, FindAndReplaceOptions const & opt) try { MatchStringAdv matchAdv(bv->buffer(), opt); + int length = bv->cursor().selectionEnd().pos() - bv->cursor().selectionBegin().pos(); + if (length > 0) + bv->putSelectionAt(bv->cursor().selectionBegin(), length, !opt.forward); findAdvReplace(bv, opt, matchAdv); cur = bv->cursor(); if (opt.forward) diff --git a/status.20x b/status.20x index 36ff77107d..d35946afa4 100644 --- a/status.20x +++ b/status.20x @@ -214,6 +214,8 @@ What's new - Fixed problem when searching with regular expressions and ignore format off (bug 8382). +- Cursor moved at proper end of selection before starting Find Advanced operation (fixing issue #8543 for advanced search) + * BUILD/INSTALLATION