From 1129eb0342ba2497e2ff7c41587917cef6111465 Mon Sep 17 00:00:00 2001 From: Tommaso Cucinotta Date: Thu, 4 Apr 2013 00:43:36 +0100 Subject: [PATCH] Fixed issue #8543 also for advanced search (cursor moved at proper end of selection before starting Find Advanced operation). --- src/lyxfind.cpp | 3 +++ status.20x | 2 ++ 2 files changed, 5 insertions(+) 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 -- 2.39.5