style - amend reset style on apply
This commit is contained in:
parent
a910f3e175
commit
cc5e55b010
|
@ -2,6 +2,7 @@ package style
|
|||
|
||||
import (
|
||||
"fmt"
|
||||
"sort"
|
||||
"strings"
|
||||
|
||||
"gitea.meta-tech.academy/go/core/util"
|
||||
|
@ -138,8 +139,13 @@ func (s *Styles) Keyval(key string, val string, names ...string) {
|
|||
}
|
||||
|
||||
func (s *Styles) Render() {
|
||||
for name, style := range s.List {
|
||||
style.Echof(" %s", name)
|
||||
keys := make([]string, 0, len(s.List))
|
||||
for name := range s.List {
|
||||
keys = append(keys, name)
|
||||
}
|
||||
sort.Strings(keys)
|
||||
for _, name := range keys {
|
||||
s.Get(name).Echof(" %s", name)
|
||||
defStyle.Ln()
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue
Block a user