Add keys Left and Right to switch tab. Also, add Escape as quit key.

This commit is contained in:
Kalle Carlbark 2019-08-29 20:22:11 +02:00
parent e0733f5ce6
commit df4d0a2ab0
No known key found for this signature in database
GPG key ID: 3FC0C93C5A5A0670

View file

@ -250,17 +250,17 @@ func main() {
select {
case e := <-uiEvents:
switch e.ID {
case "h":
case "h", "<Left>":
tabpane.FocusLeft()
termui.Clear()
termui.Render(tabpane)
renderTab()
case "l":
case "l", "<Right>":
tabpane.FocusRight()
termui.Clear()
termui.Render(tabpane)
renderTab()
case "q", "<C-c>":
case "q", "<Escape>", "<C-c>":
return
case "r":
termui.Clear()