mirror of
https://github.com/mintycube/dmenu.git
synced 2024-10-22 14:05:48 +02:00
e74a659468
Follow-up on pull request #16 this change refactors and combines the highlight and fuzzy highlight patches into one highlight function. Overall it does not make any sense using: - fuzzy highlighting when exact matching is used or - exact highlighting when fuzzy matching is used As such it makes sense to combine the two such that: - exact highlighting is used when exact matching is used and - fuzzy highlighting is used when fuzzy matching is used The FUZZYHIGHLIGHT_PATCH toggle has been removed in favour of HIGHLIGHT_PATCH. The FUZZYMATCH_PATCH toggle controls whether fuzzy matching is enabled. Enable both FUZZYMATCH_PATCH and HIGHLIGHT_PATCH to enable fuzzy highlighting. Additionally the fuzzy highlight patch only supported single-byte characters and would break when encountering multi-byte UTF-8 characters. This was reported ref. #24. This refactoring includes a change to work out the UTF-8 character length for a given character rather than assuming that every character uses one byte.
37 lines
644 B
C
37 lines
644 B
C
#if CENTER_PATCH
|
|
#include "center.c"
|
|
#endif
|
|
#if HIGHLIGHT_PATCH
|
|
#include "highlight.c"
|
|
#endif
|
|
#if FUZZYMATCH_PATCH
|
|
#include "fuzzymatch.c"
|
|
#endif
|
|
#if FZFEXPECT_PATCH
|
|
#include "fzfexpect.c"
|
|
#endif
|
|
#if HIGHPRIORITY_PATCH
|
|
#include "highpriority.c"
|
|
#endif
|
|
#if DYNAMIC_OPTIONS_PATCH
|
|
#include "dynamicoptions.c"
|
|
#endif
|
|
#if MULTI_SELECTION_PATCH
|
|
#include "multiselect.c"
|
|
#endif
|
|
#if MOUSE_SUPPORT_PATCH
|
|
#include "mousesupport.c"
|
|
#endif
|
|
#if NAVHISTORY_PATCH
|
|
#include "navhistory.c"
|
|
#endif
|
|
#if NON_BLOCKING_STDIN_PATCH
|
|
#include "nonblockingstdin.c"
|
|
#endif
|
|
#if NUMBERS_PATCH
|
|
#include "numbers.c"
|
|
#endif
|
|
#if XRESOURCES_PATCH
|
|
#include "xresources.c"
|
|
#endif
|