Skip to content

Commit

Permalink
Move cursor at the end of line after initial fuzzy search
Browse files Browse the repository at this point in the history
  • Loading branch information
aQaTL committed May 23, 2018
1 parent 41c4f3c commit 056f921
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion fuzzyselect.go
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,8 @@ func fuzzySelectEntry(ctx *cli.Context) error {
initSearch := strings.Join(ctx.Args(), " ")
fsg.Layout(gui)
fsg.InputView.Write([]byte(initSearch))
fsg.InputView.Editor.Edit(fsg.InputView, gocui.KeyArrowUp, 0, gocui.ModNone)
fsg.InputView.Editor.Edit(fsg.InputView, gocui.KeyBackspace, 0, gocui.ModNone)
fsg.InputView.MoveCursor(len(initSearch), 0, true)

err = gui.MainLoop()
if err != nil && err != gocui.ErrQuit {
Expand Down

0 comments on commit 056f921

Please sign in to comment.