summaryrefslogtreecommitdiff
path: root/src/options.go
diff options
context:
space:
mode:
authorJunegunn Choi <junegunn.c@gmail.com>2025-01-16 01:38:45 +0900
committerJunegunn Choi <junegunn.c@gmail.com>2025-01-16 01:38:45 +0900
commit3e7f032ec200f00f92fa53f9aecde4b989c7dd66 (patch)
tree490418973327dc24fcfd036e14f856a11af183d7 /src/options.go
parentb42f5bfb19b080eb12b886ec0787de47a069cc33 (diff)
downloadfzf-3e7f032ec200f00f92fa53f9aecde4b989c7dd66.tar.gz
Allow displaying --nth parts in a different text style
Close #4183
Diffstat (limited to 'src/options.go')
-rw-r--r--src/options.go6
1 files changed, 6 insertions, 0 deletions
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
}