Skip to content

Commit

Permalink
Added ESC key to exit search
Browse files Browse the repository at this point in the history
  • Loading branch information
cgxeiji committed Nov 2, 2018
1 parent 731ddb7 commit 4c39b71
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions scholar/cmd/general.go
Original file line number Diff line number Diff line change
Expand Up @@ -329,6 +329,11 @@ func gui(entries []*scholar.Entry, search string) {
panic(err)
}

g.InputEsc = true
if err := g.SetKeybinding("search", gocui.KeyEsc, gocui.ModNone, toggleSearch); err != nil {
panic(err)
}

if err := g.SetKeybinding("main", gocui.KeyEnter, gocui.ModNone, guiSelect); err != nil {
panic(err)
}
Expand Down

0 comments on commit 4c39b71

Please sign in to comment.