summaryrefslogtreecommitdiff
path: root/config.def.h
diff options
context:
space:
mode:
authorQuentin Rameau <quinq@fifth.space>2015-11-20 01:12:28 +0100
committerQuentin Rameau <quinq@fifth.space>2015-11-20 01:12:28 +0100
commit526b974c33a17b7ef77f4268bd8602e2d51ad1b9 (patch)
tree2a4cbee2a7203f57157996f0bd46372b8a16310e /config.def.h
parent320e4e4388ff65318f6daed76f2ab16b87e20c7b (diff)
downloadsurf-526b974c33a17b7ef77f4268bd8602e2d51ad1b9.tar.gz
surf-526b974c33a17b7ef77f4268bd8602e2d51ad1b9.tar.bz2
surf-526b974c33a17b7ef77f4268bd8602e2d51ad1b9.zip
Adapt find()
Slightly new behaviour: searching again for the same string (via MOD+/) resets the search (ie restarts search from document top). Searching for an empty string stops the search (ie all highlights are removed).
Diffstat (limited to 'config.def.h')
-rw-r--r--config.def.h7
1 files changed, 5 insertions, 2 deletions
diff --git a/config.def.h b/config.def.h
index dea8091..56734a9 100644
--- a/config.def.h
+++ b/config.def.h
@@ -35,6 +35,9 @@ static Bool loadimages = TRUE;
static Bool hidebackground = FALSE;
static Bool allowgeolocation = TRUE;
+static WebKitFindOptions findopts = WEBKIT_FIND_OPTIONS_CASE_INSENSITIVE |
+ WEBKIT_FIND_OPTIONS_WRAP_AROUND;
+
#define SETPROP(p, q) { \
.v = (char *[]){ "/bin/sh", "-c", \
"prop=\"`xprop -id $2 $0 " \
@@ -116,8 +119,8 @@ static Key keys[] = {
{ MODKEY, GDK_KEY_f, spawn, SETPROP("_SURF_FIND", "_SURF_FIND") },
{ MODKEY, GDK_KEY_slash, spawn, SETPROP("_SURF_FIND", "_SURF_FIND") },
- { MODKEY, GDK_KEY_n, find, { .b = TRUE } },
- { MODKEY|GDK_SHIFT_MASK, GDK_KEY_n, find, { .b = FALSE } },
+ { MODKEY, GDK_KEY_n, find, { .i = +1 } },
+ { MODKEY|GDK_SHIFT_MASK, GDK_KEY_n, find, { .i = -1 } },
{ MODKEY|GDK_SHIFT_MASK, GDK_KEY_c, toggle, { .v = "enable-caret-browsing" } },
{ MODKEY|GDK_SHIFT_MASK, GDK_KEY_i, toggle, { .v = "auto-load-images" } },