diff options
author | Phil Jones <philj56@gmail.com> | 2022-07-30 09:17:52 +0100 |
---|---|---|
committer | Phil Jones <philj56@gmail.com> | 2022-07-30 09:17:52 +0100 |
commit | 655bde52896b4d6995d0c1b349a7f34d0bb221b1 (patch) | |
tree | 3ae9c5ef8e7138bdb9356ce0a237427d5c843a0c /src/main.c | |
parent | 87757b4f0fe9dad041546d0c86a83d918c0aae92 (diff) |
Add option to colour matching portion of results.
This was done by breaking the selected result into three parts, and
rendering each separately. A side-effect is that ligatures split when a
match ends inside them, but I think that's the correct behaviour (rather
than highlighting the whole ligature).
There may be issues with some non-latin languages that make much more
extensive use of ligatures / combining characters, however.
Diffstat (limited to 'src/main.c')
-rw-r--r-- | src/main.c | 3 |
1 files changed, 3 insertions, 0 deletions
@@ -687,6 +687,8 @@ static void usage() " --prompt-text <string> Prompt text.\n" " --num-results <n> Maximum number of results to display.\n" " --selection-color <color> Color of selected result.\n" +" --selection-match-color <color> Color of the matching portion of the\n" +" selected result.\n" " --selection-padding <px> Extra horizontal padding for selected\n" " result background.\n" " --selection-background <color> Color of selected result background.\n" @@ -729,6 +731,7 @@ const struct option long_options[] = { {"font-size", required_argument, NULL, 0}, {"num-results", required_argument, NULL, 0}, {"selection-color", required_argument, NULL, 0}, + {"selection-match-color", required_argument, NULL, 0}, {"selection-padding", required_argument, NULL, 0}, {"selection-background", required_argument, NULL, 0}, {"outline-width", required_argument, NULL, 0}, |