summaryrefslogtreecommitdiff
path: root/ui/ui.go
diff options
context:
space:
mode:
authorTim Culverhouse <tim@timculverhouse.com>2022-04-20 09:38:56 -0500
committerdelthas <delthas@dille.cc>2022-04-20 18:11:23 +0200
commit80d5d8b35b450f7183fd46beedd7316f307c2b8d (patch)
treed063526395629aceddc645ee11e80ad677099773 /ui/ui.go
parentUpdate mailing list (diff)
Add a config option for unread buffer text color
This patch adds the ability to set a config option for changing the foreground text color of unread buffers (This was refactored slightly by delthas.)
Diffstat (limited to '')
-rw-r--r--ui/ui.go7
1 files changed, 6 insertions, 1 deletions
diff --git a/ui/ui.go b/ui/ui.go
index f3d232b..77757cb 100644
--- a/ui/ui.go
+++ b/ui/ui.go
@@ -19,6 +19,11 @@ type Config struct {
AutoComplete func(cursorIdx int, text []rune) []Completion
Mouse bool
MergeLine func(former *Line, addition Line)
+ Colors ConfigColors
+}
+
+type ConfigColors struct {
+ Unread tcell.Color
}
type UI struct {
@@ -84,7 +89,7 @@ func New(config Config) (ui *UI, err error) {
close(ui.Events)
}()
- ui.bs = NewBufferList(ui.config.MergeLine)
+ ui.bs = NewBufferList(config.Colors, ui.config.MergeLine)
ui.e = NewEditor(ui.config.AutoComplete)
ui.Resize()