Skip to content

Commit

Permalink
fix/too long help widget (#42)
Browse files Browse the repository at this point in the history
  • Loading branch information
prgres committed Nov 23, 2023
2 parents d648ab2 + e8d7b35 commit 4789fff
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
4 changes: 4 additions & 0 deletions ui/widgets/help/widget.go
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,10 @@ func (m Model) View(keyMap help.KeyMap) string {

physicalWidth, _, _ := term.GetSize(int(os.Stdout.Fd()))
dividerWidth := physicalWidth - lipgloss.Width(helpView) - lipgloss.Width(status)

if dividerWidth < 0 {
dividerWidth = 0
}
divider := strings.Repeat(" ", dividerWidth)

return lipgloss.JoinHorizontal(
Expand Down
2 changes: 0 additions & 2 deletions ui/widgets/tasks-table/taskstable.go
Original file line number Diff line number Diff line change
Expand Up @@ -82,8 +82,6 @@ func (m Model) KeyMap() help.KeyMap {
common.KeyBindingWithHelp(km.RowSelectToggle, "select"),
common.KeyBindingWithHelp(km.PageDown, "next page"),
common.KeyBindingWithHelp(km.PageUp, "previous page"),
common.KeyBindingWithHelp(km.PageFirst, "first page"),
common.KeyBindingWithHelp(km.PageLast, "last page"),
switchFocusToListView,
}
},
Expand Down

0 comments on commit 4789fff

Please sign in to comment.