From 8d56462e5b84ae6b86e9057d0f2120dfc7584c52 Mon Sep 17 00:00:00 2001 From: eidheim Date: Sat, 6 Feb 2016 11:01:41 +0100 Subject: [PATCH] Minor fix to autocompletion dialog --- src/selectiondialog.cc | 8 ++++++++ 1 file changed, 8 insertions(+) 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; }