changeset 1995:5c3180af5df3

Re-enabled "Find text" to select text when already shown
author Jorge Arellano Cid <jcid@dillo.org>
date Sat, 30 Apr 2011 22:18:45 -0300
parents 3a714ff1fa37
children e80effb57d8a
files src/ui.cc
diffstat 1 files changed, 13 insertions(+), 11 deletions(-) [+]
line wrap: on
line diff
--- a/src/ui.cc	Sat Apr 30 17:10:21 2011 -0300
+++ b/src/ui.cc	Sat Apr 30 22:18:45 2011 -0300
@@ -786,10 +786,7 @@
          a_UIcmd_book(a_UIcmd_get_bw_by_widget(this));
          ret = 1;
       } else if (cmd == KEYS_FIND) {
-         if (!FindBarSpace) {
-            findbar_toggle(1);
-         } else
-            FindBar->hide();
+         findbar_toggle(1);
          ret = 1;
       } else if (cmd == KEYS_WEBSEARCH) {
          a_UIcmd_search_dialog(a_UIcmd_get_bw_by_widget(this));
@@ -1146,13 +1143,18 @@
     * Most probably this is a bug in FLTK and we have to report it.
     */
 
-   if (add && !FindBarSpace) {
-      // show
-      Main->size(Main->w(), Main->h()-FindBar->h());
-      insert(*FindBar, StatusBar);
-      FindBar->show();
-      FindBarSpace = 1;
-      redraw();
+   if (add) {
+      if (!FindBarSpace) {
+         // show
+         Main->size(Main->w(), Main->h()-FindBar->h());
+         insert(*FindBar, StatusBar);
+         FindBar->show();
+         FindBarSpace = 1;
+         redraw();
+      } else {
+         // select text
+         FindBar->show();
+      }
    } else if (!add && FindBarSpace) {
       // hide
       Main->size(Main->w(), Main->h()+FindBar->h());