aboutsummaryrefslogtreecommitdiffstats
path: root/widgets/status.go
diff options
context:
space:
mode:
Diffstat (limited to 'widgets/status.go')
-rw-r--r--widgets/status.go11
1 files changed, 2 insertions, 9 deletions
diff --git a/widgets/status.go b/widgets/status.go
index 35367600..344454ac 100644
--- a/widgets/status.go
+++ b/widgets/status.go
@@ -9,10 +9,9 @@ import (
)
type StatusLine struct {
+ ui.Invalidatable
stack []*StatusMessage
fallback StatusMessage
-
- onInvalidate func(d ui.Drawable)
}
type StatusMessage struct {
@@ -31,14 +30,8 @@ func NewStatusLine() *StatusLine {
}
}
-func (status *StatusLine) OnInvalidate(onInvalidate func(d ui.Drawable)) {
- status.onInvalidate = onInvalidate
-}
-
func (status *StatusLine) Invalidate() {
- if status.onInvalidate != nil {
- status.onInvalidate(status)
- }
+ status.DoInvalidate(status)
}
func (status *StatusLine) Draw(ctx *ui.Context) {