Skip to content
This repository has been archived by the owner on Nov 20, 2020. It is now read-only.

Commit

Permalink
add info tab click handler
Browse files Browse the repository at this point in the history
  • Loading branch information
yolossn committed Sep 12, 2020
1 parent 32c43e9 commit 8ee3e86
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 0 deletions.
7 changes: 7 additions & 0 deletions pkg/gui/info.go
Original file line number Diff line number Diff line change
Expand Up @@ -15,3 +15,10 @@ func (gui *Gui) onInfoClick(g *gocui.Gui, v *gocui.View) error {
return nil
}

func (gui *Gui) onInfoTabCick(tabIndex int) error {
resourceView := gui.getInfoView()
resourceView.TabIndex = tabIndex

return nil
}

4 changes: 4 additions & 0 deletions pkg/gui/keybindings.go
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,10 @@ func (gui *Gui) SetKeybindings(g *gocui.Gui) error {
return err
}

if err := g.SetTabClickBinding("info", gui.onInfoTabCick); err != nil {
return err
}

return nil
}

Expand Down

0 comments on commit 8ee3e86

Please sign in to comment.