mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-11-07 02:28:35 +00:00
Clean up previous selections with empty searchstr on instant
This commit is contained in:
parent
ab1cc8e1c2
commit
80cb0650e4
@ -193,7 +193,7 @@ void GuiSearchWidget::findChanged()
|
||||
replacePB->setEnabled(replace);
|
||||
replacePrevPB->setEnabled(replace);
|
||||
replaceallPB->setEnabled(replace);
|
||||
if (instantSearchCB->isChecked() && !emptytext)
|
||||
if (instantSearchCB->isChecked())
|
||||
doFind(false, true);
|
||||
}
|
||||
|
||||
|
@ -279,6 +279,15 @@ bool findOne(BufferView * bv, docstring const & searchstr,
|
||||
bool find_del, bool check_wrap, bool auto_wrap,
|
||||
bool instant, bool onlysel)
|
||||
{
|
||||
// Clean up previous selections with empty searchstr on instant
|
||||
if (searchstr.empty() && instant) {
|
||||
if (bv->cursor().selection()) {
|
||||
bv->setCursor(bv->cursor().selectionBegin());
|
||||
bv->clearSelection();
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
if (!searchAllowed(searchstr))
|
||||
return false;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user