Commits

hpdeifel committed f44c6bd

Don't modify the input bar if it's focused

Prevents echo() from setting the text of the input bar if it has the
focus (i.e. the user is currently typing something).

committer: Hannes Schueller <hannes@yllr.net>

Comments (0)

Files changed (1)

     if (index < Info || index > Error)
         return TRUE;
 
-    set_widget_font_and_color(inputbox, urlboxfont[index], urlboxbgcolor[index], urlboxcolor[index]);
-    gtk_entry_set_text(GTK_ENTRY(inputbox), !arg->s ? "" : arg->s);
+    if (!gtk_widget_is_focus(GTK_WIDGET(inputbox))) {
+        set_widget_font_and_color(inputbox, urlboxfont[index], urlboxbgcolor[index], urlboxcolor[index]);
+        gtk_entry_set_text(GTK_ENTRY(inputbox), !arg->s ? "" : arg->s);
+    }
 
     return TRUE;
 }