termui: use 'q' for quit and 's' for search

This commit is contained in:
Michael Muré 2018-09-13 17:55:55 +02:00
parent bf11c08f5a
commit f8b0b4f530
No known key found for this signature in database
GPG Key ID: A4457C029293126F

View File

@ -120,7 +120,7 @@ func (bt *bugTable) layout(g *gocui.Gui) error {
v.Frame = false
v.BgColor = gocui.ColorBlue
fmt.Fprintf(v, "[Esc] Quit [q] Query [←↓↑→,hjkl] Navigation [enter] Open bug [n] New bug [i] Pull [o] Push")
fmt.Fprintf(v, "[q] Quit [s] Search [←↓↑→,hjkl] Navigation [enter] Open bug [n] New bug [i] Pull [o] Push")
}
_, err = g.SetCurrentView(bugTableView)
@ -129,7 +129,7 @@ func (bt *bugTable) layout(g *gocui.Gui) error {
func (bt *bugTable) keybindings(g *gocui.Gui) error {
// Quit
if err := g.SetKeybinding(bugTableView, gocui.KeyEsc, gocui.ModNone, quit); err != nil {
if err := g.SetKeybinding(bugTableView, 'q', gocui.ModNone, quit); err != nil {
return err
}
@ -204,7 +204,7 @@ func (bt *bugTable) keybindings(g *gocui.Gui) error {
}
// Query
if err := g.SetKeybinding(bugTableView, 'q', gocui.ModNone,
if err := g.SetKeybinding(bugTableView, 's', gocui.ModNone,
bt.changeQuery); err != nil {
return err
}