summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/options.go2
-rw-r--r--src/terminal.go2
-rw-r--r--src/tui/tui.go9
3 files changed, 12 insertions, 1 deletions
diff --git a/src/options.go b/src/options.go
index 9042b6d7..cb077a17 100644
--- a/src/options.go
+++ b/src/options.go
@@ -1262,6 +1262,8 @@ func parseTheme(defaultTheme *tui.ColorTheme, str string) (*tui.ColorTheme, erro
mergeAttr(&theme.Header)
case "header-bg":
mergeAttr(&theme.HeaderBg)
+ case "gap-line":
+ mergeAttr(&theme.GapLine)
default:
fail()
}
diff --git a/src/terminal.go b/src/terminal.go
index 2889bf01..a5d8f767 100644
--- a/src/terminal.go
+++ b/src/terminal.go
@@ -957,7 +957,7 @@ func NewTerminal(opts *Options, eventBox *util.EventBox, executor *util.Executor
// Gap line
if t.gap > 0 && len(*opts.GapLine) > 0 {
- t.gapLine, t.gapLineLen = t.ansiLabelPrinter(*opts.GapLine, &tui.ColListBorder, true)
+ t.gapLine, t.gapLineLen = t.ansiLabelPrinter(*opts.GapLine, &tui.ColGapLine, true)
}
if opts.Ellipsis != nil {
diff --git a/src/tui/tui.go b/src/tui/tui.go
index 921c7a04..212a1bed 100644
--- a/src/tui/tui.go
+++ b/src/tui/tui.go
@@ -341,6 +341,7 @@ type ColorTheme struct {
BorderLabel ColorAttr
ListLabel ColorAttr
ListBorder ColorAttr
+ GapLine ColorAttr
}
type Event struct {
@@ -655,6 +656,7 @@ var (
ColHeaderLabel ColorPair
ColSeparator ColorPair
ColScrollbar ColorPair
+ ColGapLine ColorPair
ColBorder ColorPair
ColPreview ColorPair
ColPreviewBorder ColorPair
@@ -708,6 +710,7 @@ func EmptyTheme() *ColorTheme {
HeaderBg: ColorAttr{colUndefined, AttrUndefined},
HeaderBorder: ColorAttr{colUndefined, AttrUndefined},
HeaderLabel: ColorAttr{colUndefined, AttrUndefined},
+ GapLine: ColorAttr{colUndefined, AttrUndefined},
Nth: ColorAttr{colUndefined, AttrUndefined},
}
}
@@ -752,6 +755,7 @@ func NoColorTheme() *ColorTheme {
HeaderBg: ColorAttr{colDefault, AttrUndefined},
HeaderBorder: ColorAttr{colDefault, AttrUndefined},
HeaderLabel: ColorAttr{colDefault, AttrUndefined},
+ GapLine: ColorAttr{colDefault, AttrUndefined},
Nth: ColorAttr{colUndefined, AttrUndefined},
}
}
@@ -793,6 +797,7 @@ func init() {
InputBg: ColorAttr{colUndefined, AttrUndefined},
InputBorder: ColorAttr{colUndefined, AttrUndefined},
InputLabel: ColorAttr{colUndefined, AttrUndefined},
+ GapLine: ColorAttr{colUndefined, AttrUndefined},
Nth: ColorAttr{colUndefined, AttrUndefined},
}
Dark256 = &ColorTheme{
@@ -831,6 +836,7 @@ func init() {
InputBg: ColorAttr{colUndefined, AttrUndefined},
InputBorder: ColorAttr{colUndefined, AttrUndefined},
InputLabel: ColorAttr{colUndefined, AttrUndefined},
+ GapLine: ColorAttr{colUndefined, AttrUndefined},
Nth: ColorAttr{colUndefined, AttrUndefined},
}
Light256 = &ColorTheme{
@@ -872,6 +878,7 @@ func init() {
HeaderBg: ColorAttr{colUndefined, AttrUndefined},
HeaderBorder: ColorAttr{colUndefined, AttrUndefined},
HeaderLabel: ColorAttr{colUndefined, AttrUndefined},
+ GapLine: ColorAttr{colUndefined, AttrUndefined},
Nth: ColorAttr{colUndefined, AttrUndefined},
}
}
@@ -927,6 +934,7 @@ func InitTheme(theme *ColorTheme, baseTheme *ColorTheme, forceBlack bool, hasInp
theme.ListBorder = o(theme.Border, theme.ListBorder)
theme.Separator = o(theme.ListBorder, theme.Separator)
theme.Scrollbar = o(theme.ListBorder, theme.Scrollbar)
+ theme.GapLine = o(theme.ListBorder, theme.GapLine)
/*
--color list-border:green
--color scrollbar:red
@@ -992,6 +1000,7 @@ func initPalette(theme *ColorTheme) {
ColInfo = pair(theme.Info, theme.InputBg)
ColSeparator = pair(theme.Separator, theme.InputBg)
ColScrollbar = pair(theme.Scrollbar, theme.ListBg)
+ ColGapLine = pair(theme.GapLine, theme.ListBg)
ColBorder = pair(theme.Border, theme.Bg)
ColBorderLabel = pair(theme.BorderLabel, theme.Bg)
ColPreviewLabel = pair(theme.PreviewLabel, theme.PreviewBg)