File tree Expand file tree Collapse file tree 2 files changed +8
-6
lines changed Expand file tree Collapse file tree 2 files changed +8
-6
lines changed Original file line number Diff line number Diff line change @@ -50,14 +50,9 @@ func (self *OptionsMapMgr) renderContextOptionsMap() {
50
50
displayStyle = * binding .DisplayStyle
51
51
}
52
52
53
- description := binding .Description
54
- if binding .ShortDescription != "" {
55
- description = binding .ShortDescription
56
- }
57
-
58
53
return bindingInfo {
59
54
key : keybindings .LabelFromKey (binding .Key ),
60
- description : description ,
55
+ description : binding . GetShortDescription () ,
61
56
style : displayStyle ,
62
57
}
63
58
})
Original file line number Diff line number Diff line change @@ -47,6 +47,13 @@ func (b *Binding) IsDisabled() bool {
47
47
return b .GetDisabledReason != nil && b .GetDisabledReason () != nil
48
48
}
49
49
50
+ func (b * Binding ) GetShortDescription () string {
51
+ if b .ShortDescription != "" {
52
+ return b .ShortDescription
53
+ }
54
+ return b .Description
55
+ }
56
+
50
57
// A guard is a decorator which checks something before executing a handler
51
58
// and potentially early-exits if some precondition hasn't been met.
52
59
type Guard func (func () error ) func () error
You can’t perform that action at this time.
0 commit comments