Browse Source

Fixed completion dialog wrap arround navigation

pipelines/280567345
Andreas Hammer 5 years ago
parent
commit
d23a707458
  1. 12
      src/selection_dialog.cpp

12
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();

Loading…
Cancel
Save