diff options
author | Dave Davenport <qball@gmpclient.org> | 2018-12-14 16:58:26 +0100 |
---|---|---|
committer | Dave Davenport <qball@gmpclient.org> | 2018-12-14 16:58:26 +0100 |
commit | 6b96ae123bd9bd0a1d13f3deebb560b45eeef80d (patch) | |
tree | d1b7a9343f488ea4f6a2767abdcc50ab612144bb /source | |
parent | 30e500450d3eaac56d683a0020f099b0822408eb (diff) |
Add an option to change the matching negation character.
Fixes: #877
Diffstat (limited to 'source')
-rw-r--r-- | source/helper.c | 2 | ||||
-rw-r--r-- | source/xrmoptions.c | 2 |
2 files changed, 3 insertions, 1 deletions
diff --git a/source/helper.c b/source/helper.c index 788eb489..3174d34d 100644 --- a/source/helper.c +++ b/source/helper.c @@ -221,7 +221,7 @@ static rofi_int_matcher * create_regex ( const char *input, int case_sensitive ) GRegex * retv = NULL; gchar *r; rofi_int_matcher *rv = g_malloc0 ( sizeof ( rofi_int_matcher ) ); - if ( input && input[0] == '-' ) { + if ( input && input[0] == config.matching_negate_char ) { rv->invert = 1; input++; } diff --git a/source/xrmoptions.c b/source/xrmoptions.c index c8eb37cd..cb05a9b4 100644 --- a/source/xrmoptions.c +++ b/source/xrmoptions.c @@ -214,6 +214,8 @@ static XrmOption xrmOptions[] = { "Max history size (WARNING: can cause slowdowns when set to high).", CONFIG_DEFAULT }, { xrm_Boolean, "combi-hide-mode-prefix", { .snum = &config.combi_hide_mode_prefix }, NULL, "Hide the prefix mode prefix on the combi view.", CONFIG_DEFAULT }, + { xrm_Char, "matching-negate-char", { .charc= &config.matching_negate_char }, NULL, + "Set the character used to negate the matching. ('\\0' to disable)", CONFIG_DEFAULT }, }; /** Dynamic array of extra options */ |