diff --git a/internal/ui/app.go b/internal/ui/app.go index 686dafc0..a1f21b7b 100644 --- a/internal/ui/app.go +++ b/internal/ui/app.go @@ -190,9 +190,6 @@ func (a *App) ActivateCmd(b bool) { // GetCmd retrieves user command. func (a *App) GetCmd() string { - if sugs := a.cmdBuff.Suggestions(); len(sugs) >= 1 { - return a.cmdBuff.GetText() + sugs[0] - } return a.cmdBuff.GetText() } diff --git a/internal/view/app.go b/internal/view/app.go index c3c9c1b4..1d850788 100644 --- a/internal/view/app.go +++ b/internal/view/app.go @@ -626,9 +626,8 @@ func (a *App) toggleCrumbsCmd(evt *tcell.EventKey) *tcell.EventKey { } func (a *App) gotoCmd(evt *tcell.EventKey) *tcell.EventKey { - c := a.GetCmd() - if a.CmdBuff().IsActive() && c != "" { - a.gotoResource(c, "", true, true) + if a.CmdBuff().IsActive() && !a.CmdBuff().Empty() { + a.gotoResource(a.GetCmd(), "", true, true) a.ResetCmd() return nil }