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

(Trailing?) context of a section does not get folded #94

Open
hotsphink opened this issue Feb 8, 2025 · 0 comments
Open

(Trailing?) context of a section does not get folded #94

hotsphink opened this issue Feb 8, 2025 · 0 comments
Labels
bug Something isn't working

Comments

@hotsphink
Copy link

Description of the bug

When I fold a section, it removes the changed lines from view, and usually the leading context, but usually leaves the trailing context of those changes visible. Actually, it seems very inconsistent; I'm not sure when it chooses to collapse things and when not.

Expected behavior

Folding a file seems to always fold the whole file, as expected.

I would expect folding a section to hide both leading and trailing context if it is not shared with a neighboring unfolded section.

Actual behavior

Consider

Image

If I fold the section 1/6, I get

Image

Notice how the leading context is gone (good), the one changed line is gone (good), but the trailing context (lines 236..238) is still there.

Folding section 2/6 (with the first still folded) does the same thing, which turns out to be correct in this case:

Image

lines 236..238 are now gone, the ellipsis is gone, lines 1619..1621 are gone. The changed lines are gone. The trailing context is still there, but that's ok this time because it's shared with the next section.

Folding section 3/6

Image

fails in the same way as 1/6.

Version of rustc

No response

@hotsphink hotsphink added the bug Something isn't working label Feb 8, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant