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

Feature request: Showing N context lines in diff #28

Open
tsoernes opened this issue Apr 6, 2021 · 1 comment
Open

Feature request: Showing N context lines in diff #28

tsoernes opened this issue Apr 6, 2021 · 1 comment

Comments

@tsoernes
Copy link

tsoernes commented Apr 6, 2021

I want too see more context in the diff. It would be nice to be able to specify N lines before/after, like with grep

@swolchok
Copy link
Contributor

I'm not sure when I'm going to be able to implement this, but there is a workaround available. If the crossterm crate is able to detect the size of your terminal (it claims it works on both Unix & Windows), then making your terminal window taller should show you more context:

fastmod/src/main.rs

Lines 465 to 468 in 3e5267c

let lines_to_print = match terminal::size() {
Some((_w, h)) => h,
None => 25,
} - 20;

I would also welcome a patch to add this feature.

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

No branches or pull requests

2 participants