aboutsummaryrefslogtreecommitdiffstats
path: root/config
diff options
context:
space:
mode:
Diffstat (limited to 'config')
-rw-r--r--config/style.go14
1 files changed, 13 insertions, 1 deletions
diff --git a/config/style.go b/config/style.go
index d8da4c7f..30351a24 100644
--- a/config/style.go
+++ b/config/style.go
@@ -103,6 +103,7 @@ type Style struct {
Blink bool
Underline bool
Reverse bool
+ Italic bool
}
func (s Style) Get() tcell.Style {
@@ -112,7 +113,8 @@ func (s Style) Get() tcell.Style {
Bold(s.Bold).
Blink(s.Blink).
Underline(s.Underline).
- Reverse(s.Reverse)
+ Reverse(s.Reverse).
+ Italic(s.Italic)
}
func (s *Style) Normal() {
@@ -120,6 +122,7 @@ func (s *Style) Normal() {
s.Blink = false
s.Underline = false
s.Reverse = false
+ s.Italic = false
}
func (s *Style) Default() *Style {
@@ -189,6 +192,12 @@ func (s *Style) Set(attr, val string) error {
} else {
s.Reverse = state
}
+ case "italic":
+ if state, err := boolSwitch(val, s.Italic); err != nil {
+ return err
+ } else {
+ s.Italic = state
+ }
case "default":
s.Default()
case "normal":
@@ -221,6 +230,9 @@ func (s Style) composeWith(styles []*Style) Style {
if st.Reverse != s.Reverse {
newStyle.Reverse = st.Reverse
}
+ if st.Italic != s.Italic {
+ newStyle.Italic = st.Italic
+ }
}
return newStyle
}