Added flags to enable search highlight feature.
authorDaniel Carl <danielcarl@gmx.de>
Sat, 9 Feb 2013 15:35:39 +0000 (16:35 +0100)
committerDaniel Carl <danielcarl@gmx.de>
Sat, 9 Feb 2013 15:35:39 +0000 (16:35 +0100)
config.mk
src/command.c

index 961fe8b..1f06e1f 100644 (file)
--- a/config.mk
+++ b/config.mk
@@ -37,6 +37,7 @@ LDFLAGS += $(shell pkg-config --libs $(LIBS)) -lX11 -lXext
 
 # features
 CPPFLAGS += -DFEATURE_COOKIE
+CPPFLAGS += -DFEATURE_SEARCH_HIGHLIGHT
 
 CPPFLAGS += -DVERSION=\"${VERSION}\"
 ifeq ($(USEGTK3), 1)
index a44458d..f14a77f 100644 (file)
@@ -367,7 +367,9 @@ gboolean command_search(const Arg* arg)
 
     if (arg->i == VP_SEARCH_OFF && state->search_query) {
         OVERWRITE_STRING(state->search_query, NULL);
+#ifdef FEATURE_SEARCH_HIGHLIGHT
         webkit_web_view_unmark_text_matches(vp.gui.webview);
+#endif
 
         return TRUE;
     }
@@ -382,9 +384,10 @@ gboolean command_search(const Arg* arg)
     }
 
     if (state->search_query) {
+#ifdef FEATURE_SEARCH_HIGHLIGHT
         webkit_web_view_mark_text_matches(vp.gui.webview, state->search_query, FALSE, 0);
         webkit_web_view_set_highlight_text_matches(vp.gui.webview, TRUE);
-
+#endif
         webkit_web_view_search_text(vp.gui.webview, state->search_query, FALSE, forward, TRUE);
     }