diff options
author | Dave Davenport <qball@gmpclient.org> | 2016-06-18 20:54:29 +0200 |
---|---|---|
committer | Dave Davenport <qball@gmpclient.org> | 2016-06-18 20:54:29 +0200 |
commit | 03239cb9898211c6f9537c23d6195ebce6d0efaf (patch) | |
tree | 521ea4b34ccd34b0124b56ceab4f1a4d4608cbc5 | |
parent | 7a2435a23b97a546330b80c468a7446ef128fd6b (diff) |
Remove fuzzy matching option.
-rw-r--r-- | Changelog | 3 | ||||
-rw-r--r-- | Makefile.am | 2 | ||||
-rw-r--r-- | config/config.c | 2 | ||||
-rw-r--r-- | doc/rofi-manpage.markdown | 4 | ||||
-rw-r--r-- | doc/rofi.1 | 6 | ||||
-rw-r--r-- | doc/test_xr.txt | 2 | ||||
-rw-r--r-- | include/settings.h | 2 | ||||
-rw-r--r-- | source/helper.c | 8 | ||||
-rw-r--r-- | source/xrmoptions.c | 2 | ||||
-rwxr-xr-x | test/run_fuzzy_test.sh | 22 |
10 files changed, 3 insertions, 50 deletions
@@ -1,3 +1,6 @@ +v1.unrelease + - Remove fuzzy option + v1.1.0 New Features - Keys mode, showing keybindings. diff --git a/Makefile.am b/Makefile.am index f50c0240..1a9619e3 100644 --- a/Makefile.am +++ b/Makefile.am @@ -317,8 +317,6 @@ test-x: $(bin_PROGRAMS) textbox_test $(top_srcdir)/test/run_test.sh 215 $(top_srcdir)/test/run_regex_test.sh $(top_builddir) echo "Test dmenu glob" $(top_srcdir)/test/run_test.sh 216 $(top_srcdir)/test/run_glob_test.sh $(top_builddir) - echo "Test dmenu fuzzy" - $(top_srcdir)/test/run_test.sh 217 $(top_srcdir)/test/run_fuzzy_test.sh $(top_builddir) echo "Test config dump" $(top_srcdir)/test/run_test.sh 218 $(top_srcdir)/test/xr_config_test.sh $(top_builddir) $(top_srcdir) echo "Test issue 333" diff --git a/config/config.c b/config/config.c index d20a2cb4..c1455cef 100644 --- a/config/config.c +++ b/config/config.c @@ -108,8 +108,6 @@ Settings config = { .parse_known_hosts = TRUE, /** Modi to combine into one view. */ .combi_modi = "window,run", - /** Fuzzy matching. */ - .fuzzy = FALSE, .glob = FALSE, .tokenize = TRUE, .regex = FALSE, diff --git a/doc/rofi-manpage.markdown b/doc/rofi-manpage.markdown index 6ee43a6f..4e34e145 100644 --- a/doc/rofi-manpage.markdown +++ b/doc/rofi-manpage.markdown @@ -187,10 +187,6 @@ Start in case sensitive mode. Cycle through the results list. Default is 'true'. -`-fuzzy` - -Enable experimental fuzzy matching. - `-filter` *filter* Filter the list by setting text in input bar to *filter* @@ -274,12 +274,6 @@ Start in case sensitive mode\. Cycle through the results list\. Default is \'true\'\. . .P -\fB\-fuzzy\fR -. -.P -Enable experimental fuzzy matching\. -. -.P \fB\-filter\fR \fIfilter\fR . .P diff --git a/doc/test_xr.txt b/doc/test_xr.txt index c32eda8b..d895e08d 100644 --- a/doc/test_xr.txt +++ b/doc/test_xr.txt @@ -64,8 +64,6 @@ rofi.parse-hosts: false rofi.parse-known-hosts: true ! Set the modi to combine in combi mode rofi.combi-modi: window,drun,run,ssh -! Do a more fuzzy matching -rofi.fuzzy: false ! Use glob matching rofi.glob: false ! Use regex matching diff --git a/include/settings.h b/include/settings.h index 848d8a6b..ff9393a5 100644 --- a/include/settings.h +++ b/include/settings.h @@ -106,8 +106,6 @@ typedef struct unsigned int parse_known_hosts; /** Combi Modes */ char *combi_modi; - /** Fuzzy match */ - unsigned int fuzzy; unsigned int glob; unsigned int tokenize; unsigned int regex; diff --git a/source/helper.c b/source/helper.c index f5fd027e..3b4ae2b8 100644 --- a/source/helper.c +++ b/source/helper.c @@ -178,14 +178,6 @@ static GRegex * create_regex ( const char *input, int case_sensitive ) g_free ( r ); } } - else if ( config.fuzzy ) { - gchar *r = g_regex_escape_string ( input, -1 ); - // TODO either strip fuzzy, or fix this pattern. - gchar *str = g_strdup_printf ( "[%s]+", r ); - retv = R ( str ); - g_free ( r ); - g_free ( str ); - } else{ // TODO; regex should be default? gchar *r = g_regex_escape_string ( input, -1 ); diff --git a/source/xrmoptions.c b/source/xrmoptions.c index 63bf12c5..45ccefde 100644 --- a/source/xrmoptions.c +++ b/source/xrmoptions.c @@ -139,8 +139,6 @@ static XrmOption xrmOptions[] = { "Parse known_hosts file for ssh mode" }, { xrm_String, "combi-modi", { .str = &config.combi_modi }, NULL, "Set the modi to combine in combi mode" }, - { xrm_Boolean, "fuzzy", { .num = &config.fuzzy }, NULL, - "Do a more fuzzy matching" }, { xrm_Boolean, "glob", { .num = &config.glob }, NULL, "Use glob matching" }, { xrm_Boolean, "regex", { .num = &config.regex }, NULL, diff --git a/test/run_fuzzy_test.sh b/test/run_fuzzy_test.sh deleted file mode 100755 index b055b328..00000000 --- a/test/run_fuzzy_test.sh +++ /dev/null @@ -1,22 +0,0 @@ -#!/usr/bin/env bash - -echo -en "nooty\naap\nnoot\nmies" | rofi -fuzzy -no-regex -dmenu > output.txt & -RPID=$! - -# send enter. -sleep 5; -xdotool type 'nty' -sleep 0.4 -xdotool key Return - -# Get result, kill xvfb -wait ${RPID} -RETV=$? -OUTPUT=$(cat output.txt) -if [ "${OUTPUT}" != 'nooty' ] -then - echo "Got: '${OUTPUT}' expected 'nooty'" - exit 1 -fi - -exit ${RETV} |