From 3e7f032ec200f00f92fa53f9aecde4b989c7dd66 Mon Sep 17 00:00:00 2001 From: Junegunn Choi Date: Thu, 16 Jan 2025 01:38:45 +0900 Subject: Allow displaying --nth parts in a different text style Close #4183 --- src/options.go | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'src/options.go') diff --git a/src/options.go b/src/options.go index 87ec9e6f..3dc5d2a6 100644 --- a/src/options.go +++ b/src/options.go @@ -1207,6 +1207,8 @@ func parseTheme(defaultTheme *tui.ColorTheme, str string) (*tui.ColorTheme, erro mergeAttr(&theme.SelectedFg) case "selected-bg": mergeAttr(&theme.SelectedBg) + case "nth": + mergeAttr(&theme.Nth) case "gutter": mergeAttr(&theme.Gutter) case "hl": @@ -2966,6 +2968,10 @@ func validateOptions(opts *Options) error { } } + if opts.Theme.Nth.IsColorDefined() { + return errors.New("only ANSI attributes are allowed for 'nth' (regular, bold, underline, reverse, dim, italic, strikethrough)") + } + return nil } -- cgit v1.2.3