Skip to content

Commit

Permalink
Merge pull request #128 from t-suwa/workaround-for-ntemacs-stdin-issue
Browse files Browse the repository at this point in the history
Turn off SearchStream flag by explicit root path
  • Loading branch information
monochromegane committed Jan 24, 2016
2 parents 111716b + d2770f8 commit 3ec9491
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion platinum_searcher.go
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ func (p PlatinumSearcher) Run(args []string) int {
opts.OutputOption.EnableGroup = false
}

if p.givenStdin() {
if p.givenStdin() && p.noRootPathIn(args) {
opts.SearchOption.SearchStream = true
}

Expand Down Expand Up @@ -112,3 +112,7 @@ func (p PlatinumSearcher) givenStdin() bool {
}
return false
}

func (p PlatinumSearcher) noRootPathIn(args []string) bool {
return len(args) == 1
}

0 comments on commit 3ec9491

Please sign in to comment.