Skip to content

Commit

Permalink
Fix direct edit
Browse files Browse the repository at this point in the history
  • Loading branch information
dominikschulz committed Dec 26, 2018
1 parent 676d53f commit 8ee931e
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 1 deletion.
1 change: 1 addition & 0 deletions Makefile
Expand Up @@ -91,6 +91,7 @@ racetest: $(GOPASS_OUTPUT)
go test -run '(Test|Example)' $(BUILDFLAGS) $(TESTFLAGS) -race -coverprofile=coverage.out -covermode=atomic $(pkg) -tags 'xc gogit consul' || exit 1;\
tail -n +2 coverage.out >> coverage-all.out;)
@$(GO) tool cover -html=coverage-all.out -o coverage-all.html

test: $(GOPASS_OUTPUT)
@echo ">> TEST, \"fast-mode\": race detector off"
@echo "mode: count" > coverage-all.out
Expand Down
2 changes: 1 addition & 1 deletion pkg/action/find.go
Expand Up @@ -97,7 +97,7 @@ func (s *Action) findSelection(ctx context.Context, c *cli.Context, choices []st
return cb(ctx, c, needle, "", true)
case "edit":
// edit selected entry
fmt.Println(stdout, choices[sel])
fmt.Fprintln(stdout, choices[sel])
return s.edit(ctx, c, choices[sel])
default:
return ExitError(ctx, ExitAborted, nil, "user aborted")
Expand Down
1 change: 1 addition & 0 deletions pkg/cui/cui.go
Expand Up @@ -165,6 +165,7 @@ func (s *selection) sync(g *gocui.Gui, v *gocui.View) error {
}

func (s *selection) edit(g *gocui.Gui, v *gocui.View) error {
s.selection = getSelectedLine(v)
s.action = "edit"
return gocui.ErrQuit
}
Expand Down

0 comments on commit 8ee931e

Please sign in to comment.