aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorjcid <devnull@localhost>2008-10-03 18:55:45 +0200
committerjcid <devnull@localhost>2008-10-03 18:55:45 +0200
commitc8054c09d4652a435089f5ec042b9a33bcbe12d9 (patch)
tree857ecc75523c346332bc1b0f653a304fc90438dc /src
parente00c27a018efd6e2e526e33c4e0a84e47ca8691d (diff)
- insert workaround part2
Diffstat (limited to 'src')
-rw-r--r--src/findbar.cc2
-rw-r--r--src/ui.cc3
2 files changed, 4 insertions, 1 deletions
diff --git a/src/findbar.cc b/src/findbar.cc
index 144818e3..0a580afd 100644
--- a/src/findbar.cc
+++ b/src/findbar.cc
@@ -58,7 +58,7 @@ int MyInput::handle(int e)
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')
diff --git a/src/ui.cc b/src/ui.cc
index c9aad633..ebeb2e2c 100644
--- a/src/ui.cc
+++ b/src/ui.cc
@@ -251,6 +251,7 @@ static void location_cb(Widget *wid, void *data)
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 @@ const char *UI::get_location()
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));
}