From 655bde52896b4d6995d0c1b349a7f34d0bb221b1 Mon Sep 17 00:00:00 2001 From: Phil Jones Date: Sat, 30 Jul 2022 09:17:52 +0100 Subject: 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. --- src/config.c | 2 ++ 1 file changed, 2 insertions(+) (limited to 'src/config.c') diff --git a/src/config.c b/src/config.c index a0e77b2..8cb3763 100644 --- a/src/config.c +++ b/src/config.c @@ -263,6 +263,8 @@ bool parse_option(struct tofi *tofi, const char *filename, size_t lineno, const tofi->window.entry.foreground_color = parse_color(filename, lineno, value, &err); } else if (strcasecmp(option, "selection-color") == 0) { tofi->window.entry.selection_foreground_color = parse_color(filename, lineno, value, &err); + } else if (strcasecmp(option, "selection-match-color") == 0) { + tofi->window.entry.selection_highlight_color = parse_color(filename, lineno, value, &err); } else if (strcasecmp(option, "selection-padding") == 0) { tofi->window.entry.selection_background_padding = parse_int32(filename, lineno, value, &err); } else if (strcasecmp(option, "selection-background") == 0) { -- cgit v1.2.3