summaryrefslogtreecommitdiff
path: root/internal/switcher/switcher.go
diff options
context:
space:
mode:
Diffstat (limited to 'internal/switcher/switcher.go')
-rw-r--r--internal/switcher/switcher.go12
1 files changed, 11 insertions, 1 deletions
diff --git a/internal/switcher/switcher.go b/internal/switcher/switcher.go
index fdf91af..589b029 100644
--- a/internal/switcher/switcher.go
+++ b/internal/switcher/switcher.go
@@ -67,9 +67,17 @@ func (m Model) View() string {
}
pickerView := m.pickers[m.active].View()
+ boxStyle := lipgloss.NewStyle().Border(lipgloss.RoundedBorder(), true, true, false, true)
w := lipgloss.Width(pickerView)
+ pickerView = boxStyle.Render(pickerView)
+
+ m.preview.SetWidth(w)
+ boxStyle = boxStyle.Border(lipgloss.RoundedBorder(), false, true, false, true)
+ previewStr := boxStyle.Render(m.preview.View())
m.help.Styles.ShortKey.Width(w)
+ boxStyle = boxStyle.Border(lipgloss.RoundedBorder(), false, true, true, true).Width(w)
+
var helpstr string
if m.fullHelp {
helpstr = m.help.FullHelpView(m.AllKeys())
@@ -81,10 +89,12 @@ func (m Model) View() string {
helpstr = m.help.FullHelpView(shortKeys())
}
+ helpstr = boxStyle.Render(helpstr)
+
return fmt.Sprintf("%s\n%s\n%s\n%v",
tabs,
pickerView,
- m.preview.View(),
+ previewStr,
helpstr,
)
}