From 8c62689981c1bb31805cb0b7452581907966be6a Mon Sep 17 00:00:00 2001 From: Christian Dywan Date: Thu, 28 Jan 2010 23:15:49 +0100 Subject: [PATCH] Initially pressing Up in completion should select the last match --- midori/midori-locationaction.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/midori/midori-locationaction.c b/midori/midori-locationaction.c index a0593643..a3e5cd88 100644 --- a/midori/midori-locationaction.c +++ b/midori/midori-locationaction.c @@ -853,7 +853,12 @@ midori_location_action_key_press_event_cb (GtkEntry* entry, if (event->keyval == GDK_Down || event->keyval == GDK_KP_Down) selected = MIN (selected + 1, matches -1); else if (event->keyval == GDK_Up || event->keyval == GDK_KP_Up) - selected = MAX (selected - 1, 0); + { + if (selected == -1) + selected = matches - 1; + else + selected = MAX (selected - 1, 0); + } else if (event->keyval == GDK_Page_Down) selected = MIN (selected + 14, matches -1); else if (event->keyval == GDK_Page_Up) -- 2.39.5