* Combi mode: Bang mode prefixes with len>1
This is required to match on modes that share a prefix.
Let 'power' and 'pass' be such modes for the following explanation:
Previously, only the first character of after the bang was compared,
so '!p' would always be matched to the 'pass' mode and there was no
way to limit selection in combi mode to the 'power' mode.
Now we can use prefixes of arbitrary length following the bang
such as '!po' (matches 'power' mode), or '!pa' (matches 'pass' mode).
Prefixes of length 1 are unchanged compared to the previous
behaviour, i.e. '!p' will still match 'pass'.
* Combi-mode prefixes should be utf-8 aware
* -matching *method* option instead of -regex, -glob, -fuzzy.
* Re-add fuzzy matching pattern.
* When there are substrings in regex, only highlight those matches.
Fixes: #447
In window_get_text_prop do conversion when input is of type STRING. (latin1) to utf8.
Dmenu: don't skip invalid lines, but try to display as much as possible.
Window mode: Double check all input from X.
* Only use get_display_data for displaying. (Except the select complete (ctrl-space), this needs fixing).
* Fix possible race condition in parallelization.
* Fix small bug in case-sensitive handling. (beware for collision in keybinding)
* Keep less lists around.
This patch adds a field lines_not_ascii to the MenuState structure. The
nth entry is 0 unless the nth member of MenuState.lines has a non-ascii
codepoint in it.
All comparison functions (menu_match_cb type) take an additional
argument to tell them if the thing they are matching is not_ascii. They
can use this to determine whether to collate and case-fold the
input (for non-ascii strings), or whether to use strstr/strcasestr (for
ascii strings).
The change is not currently implemented for flex matching, due to my
laziness. However, it should be a simple enough matter to add.
For my large input of 400,000 lines, this reduces typical filtering time
to about ten microseconds from about 2 seconds.