[diffs/edit] add folding support#999
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
This comment has been minimized.
This comment has been minimized.
|
@codex review |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: dc8ba464f0
ℹ️ About Codex in GitHub
Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".
| } | ||
| return { | ||
| startingLine, | ||
| totalLines: finalLine - startingLine + 1, |
There was a problem hiding this comment.
Avoid sending folded bodies through render windows
When a viewport contains both the folded header and the first visible line after a large collapsed body (for example folding lines 1–19990), startingLine can be the header while finalLine is after the fold, so this returns a render window spanning the entire hidden body. FileRenderer.renderFile forwards startingLine/totalLines into windowed plain rendering before it skips foldRanges, which means large folded regions are still sliced/joined/tokenized even though only a few visible rows are needed; please avoid passing hidden spans to the renderer or make that path skip folded bodies.
Useful? React with 👍 / 👎.
folding: falsein the editor optionFile, neverFileDiff.