From: Christian Dywan Date: Thu, 28 Jan 2010 22:15:49 +0000 (+0100) Subject: Initially pressing Up in completion should select the last match X-Git-Url: https://spindle.queued.net/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=8c62689981c1bb31805cb0b7452581907966be6a;p=midori Initially pressing Up in completion should select the last match --- 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)