Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix printing context after an early return from a search #620

Merged
merged 1 commit into from
Oct 8, 2017

Conversation

Detegr
Copy link
Contributor

@Detegr Detegr commented Oct 1, 2017

Print the context if there's a context left to be printed after returning early from a search (because of --max-count).

Fixes #402.

Print the context if there's a context left to be printed after
returning early from a search (because of --max-count).

Fixes BurntSushi#402.
@Detegr
Copy link
Contributor Author

Detegr commented Oct 1, 2017

Added a couple of test cases as well that now work the same way as grep does.

Copy link
Owner

@BurntSushi BurntSushi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice find and fix! Thanks for the regression tests too, much appreciated. :-)

@BurntSushi BurntSushi merged commit e7c06b9 into BurntSushi:master Oct 8, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants