]> spindle.queued.net Git - midori/commitdiff
Initially pressing Up in completion should select the last match
authorChristian Dywan <christian@twotoasts.de>
Thu, 28 Jan 2010 22:15:49 +0000 (23:15 +0100)
committerChristian Dywan <christian@twotoasts.de>
Thu, 28 Jan 2010 22:15:49 +0000 (23:15 +0100)
midori/midori-locationaction.c

index a0593643f279d29974c7fde554aea38e3abcffd1..a3e5cd88361d64ebce729b26ffa5929d8298b9ad 100644 (file)
@@ -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)