changeset 383:b619d3469c69

- insert workaround part2
author jcid
date Fri, 03 Oct 2008 18:55:45 +0200
parents 516b47325d66
children d33b55bb56c9
files src/findbar.cc src/ui.cc
diffstat 2 files changed, 4 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/src/findbar.cc	Fri Oct 03 17:41:06 2008 +0200
+++ b/src/findbar.cc	Fri Oct 03 18:55:45 2008 +0200
@@ -58,7 +58,7 @@
 void Findbar::search_cb(Widget *, void *vfb)
 {
    Findbar *fb = (Findbar *)vfb;
-   const char *key = fb->i->value();
+   const char *key = fb->i->text();
    bool case_sens = fb->check_btn->value();
 
    if (key[0] != '\0')
--- a/src/ui.cc	Fri Oct 03 17:41:06 2008 +0200
+++ b/src/ui.cc	Fri Oct 03 18:55:45 2008 +0200
@@ -251,6 +251,7 @@
    Input *i = (Input*)wid;
    UI *ui = (UI*)data;
 
+   _MSG("location_cb()\n");
    /* This test is necessary because WHEN_ENTER_KEY also includes
     * other events we're not interested in. For instance pressing
     * The Back or Forward, buttons, or the first click on a rendered
@@ -826,6 +827,8 @@
 void UI::set_location(const char *str)
 {
    if (!str) str = "";
+   // This text() call clears fl_pending_callback, avoiding
+   // an extra location_cb() call.
    Location->text(str);
    Location->position(strlen(str));
 }