TextAnalysisTool / Releases

Repository for storing release artifacts (ex: binaries).
92 stars 26 forks source link

Add an option to show the N lines before/after a filtered line for additional context #6

Open DavidAnson opened 9 years ago

DavidAnson commented 9 years ago

This would be similar to how diff-ing tools show 5 lines before/after a diff. N should be configurable.

JonnyOThan commented 2 years ago

(Copying my comment from an issue I opened before noticing this one)

Suppose I have a lot of lines like: A A A B A A A B A

The "B" line is essentially a marker, and what I'm really interested is in the "A" line immediately preceding the "B" line. But there are lots of "A" lines in the file that I don't care about.

I'm not entirely sure what the best way to specify something like this would be:

Maybe in the Edit Filter window there could be a bit of UI that says "include nearby line ranges" where you can enter some numbers like "-3,-1" to include the 3 lines immediately preceding the one that matches the filter.

Another possibility would be to allow for a compound filter made up of several single-line filters where each filter has to match a consecutive line. This might address some of the use cases in https://github.com/TextAnalysisTool/Releases/issues/30 as well.