diff --git a/src/selectiondialog.cc b/src/selectiondialog.cc index 8ef0754..842072e 100644 --- a/src/selectiondialog.cc +++ b/src/selectiondialog.cc @@ -380,6 +380,8 @@ bool CompletionDialog::on_key_press(GdkEventKey* key) { cursor_changed(); } } + else + list_view_text.set_cursor(list_view_text.get_model()->get_path(list_view_text.get_model()->children().begin())); select(false); return true; } @@ -392,6 +394,12 @@ bool CompletionDialog::on_key_press(GdkEventKey* key) { 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)); + } select(false); return true; }