Commit 7f54f9d3 authored by Daniel Molkentin's avatar Daniel Molkentin

Wrap completion box list when navigating with up/down arrow keys.

Reviewed-by: Thorbjorn Lindeijer
parent 06900dc4
......@@ -156,7 +156,17 @@ bool CompletionWidget::event(QEvent *e)
closeList(currentIndex());
return true;
case Qt::Key_Up:
if (currentIndex().row() == 0) {
setCurrentIndex(model()->index(model()->rowCount()-1, 0));
return true;
}
forwardKeys = false;
break;
case Qt::Key_Down:
if (currentIndex().row() == model()->rowCount()-1) {
setCurrentIndex(model()->index(0, 0));
return true;
}
case Qt::Key_Enter:
case Qt::Key_PageDown:
case Qt::Key_PageUp:
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment