summaryrefslogtreecommitdiff
path: root/doc
diff options
context:
space:
mode:
authorPhil Jones <philj56@gmail.com>2022-07-30 09:17:52 +0100
committerPhil Jones <philj56@gmail.com>2022-07-30 09:17:52 +0100
commit655bde52896b4d6995d0c1b349a7f34d0bb221b1 (patch)
tree3ae9c5ef8e7138bdb9356ce0a237427d5c843a0c /doc
parent87757b4f0fe9dad041546d0c86a83d918c0aae92 (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 'doc')
-rw-r--r--doc/config3
-rw-r--r--doc/tofi.5.md8
-rw-r--r--doc/tofi.5.scd7
3 files changed, 18 insertions, 0 deletions
diff --git a/doc/config b/doc/config
index eb360e4..454f275 100644
--- a/doc/config
+++ b/doc/config
@@ -42,6 +42,9 @@
# Selection text
selection-color = #F92672
+ # Matching portion of selection text
+ selection-match-color = #00000000
+
# Selection background
selection-background = #00000000
diff --git a/doc/tofi.5.md b/doc/tofi.5.md
index 539b525..c922fac 100644
--- a/doc/tofi.5.md
+++ b/doc/tofi.5.md
@@ -94,6 +94,14 @@ options.
>
> Default: \#F92672
+**selection-match-color**=*color*
+
+> Color of the matching portion of the selected result. Any color that
+> is fully transparent (alpha = 0) will disable this highlighting. See
+> **COLORS** for more information.
+>
+> Default: \#00000000
+
**selection-padding**=*px*
> Extra horizontal padding of the selection background. If *px* = -1,
diff --git a/doc/tofi.5.scd b/doc/tofi.5.scd
index 8341200..3993e78 100644
--- a/doc/tofi.5.scd
+++ b/doc/tofi.5.scd
@@ -85,6 +85,13 @@ options.
Default: #F92672
+*selection-match-color*=_color_
+ Color of the matching portion of the selected result. Any color that is
+ fully transparent (alpha = 0) will disable this highlighting.
+ See *COLORS* for more information.
+
+ Default: #00000000
+
*selection-padding*=_px_
Extra horizontal padding of the selection background. If _px_ = -1,
the padding will fill the whole window width.