nano

nano with my custom patches
git clone git://bsandro.tech/nano
Log | Files | Refs | README | LICENSE

commit 282f438967b8c056900ec71775eec6c7f470e012
parent 1b01adfa9fbfbe3efdbb465b25c7e50be3ed4de5
Author: Benno Schulenberg <bensberg@telfort.nl>
Date:   Mon, 15 Feb 2021 11:29:23 +0100

color: use bright yellow to highlight a search match

Plain yellow is too dark (more like brown) on some machines.
Lightyellow is a bit loud, but... very visible.

Diffstat:
Mdoc/nano.texi | 2+-
Mdoc/nanorc.5 | 2+-
Msrc/color.c | 2+-
3 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/doc/nano.texi b/doc/nano.texi @@ -894,7 +894,7 @@ text. (The color of the stripe can be changed with @code{set stripecolor}.) @item set highlightcolor [bold,][italic,]@var{fgcolor},@var{bgcolor} Use this color combination for highlighting a search match. -The default value is @t{black,yellow}. +The default value is @t{black,lightyellow}. @xref{@code{set functioncolor}} for valid color names. @item set historylog diff --git a/doc/nanorc.5 b/doc/nanorc.5 @@ -148,7 +148,7 @@ text. (The color of the stripe can be changed with \fBset stripecolor\fR.) .TP .B set highlightcolor \fR[\fBbold,\fR][\fBitalic,\fR]\fIfgcolor\fB,\fIbgcolor\fR Use this color combination for highlighting a search match. -The default value is \fBblack,yellow\fR. +The default value is \fBblack,lightyellow\fR. See \fBset titlecolor\fR for valid color names. .TP .B set historylog diff --git a/src/color.c b/src/color.c @@ -59,7 +59,7 @@ void set_interface_colorpairs(void) else if (index == GUIDE_STRIPE) interface_color_pair[index] = A_REVERSE; else if (index == HIGHLIGHTED) { - init_pair(index + 1, COLOR_BLACK, COLOR_YELLOW); + init_pair(index + 1, COLOR_BLACK, COLOR_YELLOW + (COLORS > 15 ? 8 : 0)); interface_color_pair[index] = COLOR_PAIR(index + 1); } else if (index == PROMPT_BAR) interface_color_pair[index] = interface_color_pair[TITLE_BAR];