forked from qt-creator/qt-creator
TextEditor: avoid setting a null cursor on select all
Change-Id: If7ccdf1e1d4846b279305e30d3a990754f942128 Reviewed-by: Christian Stenger <christian.stenger@qt.io>
This commit is contained in:
committed by
Christian Stenger
parent
7a4bbab6f7
commit
f00394b371
@@ -986,6 +986,8 @@ void TextEditorWidgetFind::selectAll(const QString &txt, FindFlags findFlags)
|
||||
if (future.resultCount() <= 0)
|
||||
return;
|
||||
const SearchResultItems &results = future.result();
|
||||
if (results.isEmpty())
|
||||
return;
|
||||
const auto cursorForResult = [this](const SearchResultItem &item) {
|
||||
return selectRange(m_editor->document(), item.mainRange());
|
||||
};
|
||||
|
Reference in New Issue
Block a user