Skip to content

Commit

Permalink
h/l and left/right can also change focus
Browse files Browse the repository at this point in the history
  • Loading branch information
meowgorithm committed Aug 19, 2021
1 parent 7c23d17 commit 7456678
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions tui/bubble.go
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,14 @@ func (b *Bubble) Update(msg tea.Msg) (tea.Model, tea.Cmd) {
return b, tea.Quit
case "tab":
b.activeBox = (b.activeBox + 1) % 2
case "h", "left":
if b.activeBox > 0 {
b.activeBox--
}
case "l", "right":
if b.activeBox < len(b.boxes)-1 {
b.activeBox++
}
}
case errMsg:
b.error = msg.Error()
Expand Down

0 comments on commit 7456678

Please sign in to comment.