]> git.lyx.org Git - features.git/commitdiff
Fixed issue #8543 also for advanced search (cursor moved at proper end of selection...
authorTommaso Cucinotta <tommaso@lyx.org>
Wed, 3 Apr 2013 23:43:36 +0000 (00:43 +0100)
committerTommaso Cucinotta <tommaso@lyx.org>
Sun, 21 Apr 2013 21:39:28 +0000 (22:39 +0100)
src/lyxfind.cpp
status.20x

index a81e293fc2a8bcc65f0acd2368519c65f54d10d6..a4ae87093026c5d52469ced869340faaf36b72a5 100644 (file)
@@ -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)
index 36ff77107dcf98cf587d468f3e2bf063256c1243..d35946afa40cc016cfbf761c50cffa0255751a68 100644 (file)
@@ -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