You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Sep 6, 2021. It is now read-only.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
For #9659 (at least part of it).
Best to explain with a before/after: Before:
After:
So there are three ways text can clip:
If endCh (last char of match) is < 200, the line is simply displayed and clipped after 200 chars
If the match is longer than 200 chars, the match is displayed, highlighted and clipped after 200 chars (may not be perfect, but you'll probably only get into this state with RegExps)
Else, the code tries to center the match in the displayed line (and, of course, it highlights the match)
The reason will be displayed to describe this comment to others. Learn more.
@marcelgerber I think this might run into some bugs with matches that span multiple lines. The code here still assumes the start ch is on the first line of the match and the end ch is on the last, which might be incorrect depending on which clipping case you fall into. This was already somewhat buggy before your change, so it may not be an urgent issue... but just fyi. In case you feel like doing any more work on this code :-)
Also, might not hurt to add some clipping tests to FindInFiles-test at some point.
Sign up for freeto subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Labels
None yet
3 participants
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
For #9659 (at least part of it).

Best to explain with a before/after:
Before:
After:

So there are three ways text can clip: