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