summaryrefslogtreecommitdiff
path: root/internal/switcher/switcher.go
diff options
context:
space:
mode:
authorBenjamin Chausse <benjamin@chausse.xyz>2024-12-27 18:04:11 -0500
committerBenjamin Chausse <benjamin@chausse.xyz>2024-12-27 18:04:11 -0500
commit68ba0d4a215f8c99649779e71cd9ff31eb210edc (patch)
treea9907f15d5b6dffabd9a6ed3fb310072989f8fc1 /internal/switcher/switcher.go
parent3b8fa0766a0050c0dd026be5d6a1ce2827956530 (diff)
Fix BinaryFill Example
Diffstat (limited to 'internal/switcher/switcher.go')
-rw-r--r--internal/switcher/switcher.go11
1 files changed, 6 insertions, 5 deletions
diff --git a/internal/switcher/switcher.go b/internal/switcher/switcher.go
index 91a46ef..e0b9579 100644
--- a/internal/switcher/switcher.go
+++ b/internal/switcher/switcher.go
@@ -123,15 +123,16 @@ func (m Model) View() string {
m.help.Styles.ShortKey.Width(w)
- var helpstr string
+ var helpStr string
+ m.help.Width = w
if m.fullHelp {
- helpstr = m.help.FullHelpView(m.AllKeys())
+ helpStr = m.help.FullHelpView(m.AllKeys())
} else {
// This is a hack since the current view has too many keys
// and the horizontal "ShortHelpView" gets too wide.
// "FullHelpView" seperates keys by columns (and we only show the first).
- // helpstr = m.help.FullHelpView([][]key.Binding{m.AllKeys()[0]})
- helpstr = m.help.FullHelpView(shortKeys())
+ // helpStr = m.help.FullHelpView([][]key.Binding{m.AllKeys()[0]})
+ helpStr = m.help.FullHelpView(shortKeys())
}
var inputStr string
@@ -143,7 +144,7 @@ func (m Model) View() string {
mainArea := ui.Style().Boxed.Render(strings.Join([]string{
pickerStr,
previewStr,
- helpstr,
+ helpStr,
}, "\n"))
return strings.Join(