summaryrefslogtreecommitdiff
path: root/config.go
diff options
context:
space:
mode:
Diffstat (limited to 'config.go')
-rw-r--r--config.go11
1 files changed, 11 insertions, 0 deletions
diff --git a/config.go b/config.go
index 5ac2a8a..7823ae7 100644
--- a/config.go
+++ b/config.go
@@ -68,6 +68,7 @@ type Config struct {
ChanColEnabled bool
MemberColWidth int
MemberColEnabled bool
+ TextMaxWidth int
Colors ConfigColors
@@ -100,6 +101,7 @@ func Defaults() (cfg Config, err error) {
ChanColEnabled: true,
MemberColWidth: 16,
MemberColEnabled: true,
+ TextMaxWidth: 0,
Colors: ConfigColors{
Prompt: tcell.ColorDefault,
Unread: tcell.ColorDefault,
@@ -241,6 +243,15 @@ func unmarshal(filename string, cfg *Config) (err error) {
} else {
cfg.MemberColWidth = members
}
+ case "text":
+ var text string
+ if err := child.ParseParams(&text); err != nil {
+ return err
+ }
+
+ if cfg.TextMaxWidth, err = strconv.Atoi(text); err != nil {
+ return err
+ }
default:
return fmt.Errorf("unknown directive %q", child.Name)
}