[RFC] Fix crashes with very long lines #3527
Closed
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.
This commit ignores virtcols after the 32000th in some computations, in
order to avoid crashing or hanging when editing a file than contains
ludicrously long lines (more than 100,000,000 virtual columns).
The change is in plines_win_nofold, which is called by wrapping and folding
code. As a result, wrapping and folding will be done incorrectly for lines longer
than 32000 virtual columns. This has zero impact if the UI cannot render more
than 32000 characters at a time (which is usually the case).
fixes #2838 (see that issue for further discussion).