Skip to content

Commit 6968e8e

Browse files
committed
feat(ui): allow tree view keyboard navigation if query is empty
1 parent 3118649 commit 6968e8e

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

src/libs/ui/searchsidebar.cpp

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -347,6 +347,14 @@ bool SearchSidebar::eventFilter(QObject *object, QEvent *event)
347347
if (object == m_searchEdit && event->type() == QEvent::KeyPress) {
348348
auto e = static_cast<QKeyEvent *>(event);
349349
switch (e->key()) {
350+
case Qt::Key_Home:
351+
case Qt::Key_End:
352+
case Qt::Key_Left:
353+
case Qt::Key_Right:
354+
if (!m_searchEdit->text().isEmpty()) {
355+
break;
356+
}
357+
[[clang::fallthrough]];
350358
case Qt::Key_Return:
351359
case Qt::Key_Down:
352360
case Qt::Key_Up:

0 commit comments

Comments
 (0)