From: Daniel Carl <danielcarl@gmx.de>
Date: Sat, 9 Feb 2013 15:35:39 +0000 (+0100)
Subject: Added flags to enable search highlight feature.
X-Git-Url: https://git.owens.tech/dummy.html/dummy.html/git?a=commitdiff_plain;h=f4c6a6f8dc072b821ee42129a2905beaaa8d0320;p=vimb.git

Added flags to enable search highlight feature.
---

diff --git a/config.mk b/config.mk
index 961fe8b..1f06e1f 100644
--- 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)
diff --git a/src/command.c b/src/command.c
index a44458d..f14a77f 100644
--- a/src/command.c
+++ b/src/command.c
@@ -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);
     }