diff --git a/src/selection_dialog.cpp b/src/selection_dialog.cpp index c652b55..fc6ba80 100644 --- a/src/selection_dialog.cpp +++ b/src/selection_dialog.cpp @@ -432,6 +432,10 @@ bool CompletionDialog::on_key_press(GdkEventKey *event) { list_view_text.set_cursor(list_view_text.get_model()->get_path(it)); cursor_changed(); } + else { + list_view_text.set_cursor(list_view_text.get_model()->get_path(list_view_text.get_model()->children().begin())); + cursor_changed(); + } } else list_view_text.set_cursor(list_view_text.get_model()->get_path(list_view_text.get_model()->children().begin())); @@ -446,6 +450,14 @@ bool CompletionDialog::on_key_press(GdkEventKey *event) { list_view_text.set_cursor(list_view_text.get_model()->get_path(it)); cursor_changed(); } + else { + auto last_it = list_view_text.get_model()->children().end(); + last_it--; + if(last_it) { + list_view_text.set_cursor(list_view_text.get_model()->get_path(last_it)); + cursor_changed(); + } + } } else { auto last_it = list_view_text.get_model()->children().end();