Don't drop search on non-empty backspace.

This commit is contained in:
John Preston 2024-06-03 22:26:59 +04:00
parent 88e742927f
commit 9043c18725
1 changed files with 2 additions and 1 deletions

View File

@ -3425,7 +3425,8 @@ void Widget::keyPressEvent(QKeyEvent *e) {
//}
} else if ((e->key() == Qt::Key_Backspace || e->key() == Qt::Key_Tab)
&& _searchHasFocus
&& !_searchState.inChat) {
&& !_searchState.inChat
&& _searchState.query.isEmpty()) {
escape();
} else if (e->key() == Qt::Key_Return || e->key() == Qt::Key_Enter) {
submit();