From: Christian Dywan Date: Thu, 19 Mar 2009 22:37:32 +0000 (+0100) Subject: Strip selection from spaces when middle click opening X-Git-Url: https://spindle.queued.net/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=2421a3163fe98f163497b9216d6a1a5fdb36223f;p=midori Strip selection from spaces when middle click opening It happens every so often that you quickly select an address and there's leading or trailing space you accidentally hit. So we strip the selection, otherwise such addresses don't work. --- diff --git a/midori/midori-view.c b/midori/midori-view.c index a7c5ff9b..36b0b64d 100644 --- a/midori/midori-view.c +++ b/midori/midori-view.c @@ -807,7 +807,7 @@ gtk_widget_button_press_event_cb (WebKitWebView* web_view, gtk_widget_get_display (GTK_WIDGET (view)), GDK_SELECTION_PRIMARY); uri = gtk_clipboard_wait_for_text (clipboard); - if (uri && strchr (uri, '.') && !strchr (uri, ' ')) + if (uri && strchr (uri, '.') && !strchr (g_strstrip (uri), ' ')) { new_uri = sokoke_magic_uri (uri, NULL); if (event->state & GDK_CONTROL_MASK)