aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--config/style.go14
-rw-r--r--doc/aerc-stylesets.7.scd6
2 files changed, 19 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
}
diff --git a/doc/aerc-stylesets.7.scd b/doc/aerc-stylesets.7.scd
index 8aac6c49..acd5ac7c 100644
--- a/doc/aerc-stylesets.7.scd
+++ b/doc/aerc-stylesets.7.scd
@@ -56,6 +56,12 @@ style objects.
Syntax: `<style_object>.underline=<true|false|toggle>`
+*italic*
+ The italic attribute of the style object is set/unset.
+ _The terminal needs to support italic text_
+
+ Syntax: `<style_object>.italic=<true|false|toggle>`
+
*reverse*
Reverses the color of the style object. Exchanges the foreground
and background colors.