forked from qt-creator/qt-creator
don't allow keys with empty text to reset the currently selected completion item
forwarding keys with empty text() does not restrict the matching items, but updating the list of possible completions resets the currently selected item to the first one
This commit is contained in:
@@ -211,6 +211,9 @@ bool CompletionWidget::event(QEvent *e)
|
|||||||
forwardKeys = false;
|
forwardKeys = false;
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
|
// if a key is forwarded, completion widget is re-opened and selected item is reset to first,
|
||||||
|
// so only forward keys that insert text and refine the completed item
|
||||||
|
forwardKeys = !ke->text().isEmpty();
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user