Skip to content

Conversation

@danthe1st
Copy link
Contributor

@danthe1st danthe1st commented Oct 26, 2025

When setVisibleRegion is repeatedly called with projection regions enabled, it first expands everything outside of the old visible region and then collapses everything inside the new visible region. This can result in Eclipse showing unwanted text for a fraction of a second.

Without this change:

Screencast_20251026_113947.webm

With this change:

Screencast_20251026_114117.webm

(I made the recordings with eclipse-jdt/eclipse.jdt.ui#2302 active to get the visible regions logic in JDT)

I don't think an automated test is reasonable for this but I can try to provide a way to reproduce this manually without JDT if necessary.

@github-actions
Copy link
Contributor

github-actions bot commented Oct 26, 2025

Test Results

 3 015 files  ±0   3 015 suites  ±0   2h 12m 26s ⏱️ + 5m 20s
 8 258 tests ±0   8 010 ✅ ±0  248 💤 ±0  0 ❌ ±0 
23 598 runs  ±0  22 807 ✅ ±0  791 💤 ±0  0 ❌ ±0 

Results for commit 0df6f52. ± Comparison against base commit e81ba1c.

♻️ This comment has been updated with latest results.

@danthe1st
Copy link
Contributor Author

danthe1st commented Jan 5, 2026

(only rebased/updated copyright headers, still waiting for re-review)

@danthe1st danthe1st requested a review from iloveeclipse January 5, 2026 11:20
@vogella vogella dismissed iloveeclipse’s stale review January 12, 2026 09:19

No response in a week

@vogella vogella force-pushed the set-visible-region-flickering branch from 0c8d2ab to 0df6f52 Compare January 12, 2026 09:19
Copy link
Contributor

@vogella vogella left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The changes look good to me.

The logic correctly handles the redraw state and ensures the scroll position is maintained (or ignored if redraw was already disabled) using the TextViewer.setRedraw(boolean, int) API. The try...finally block ensures that redrawing is always restored.

Also, thanks for updating the copyright year.

@vogella vogella merged commit 22fd647 into eclipse-platform:master Jan 12, 2026
18 checks passed
@vogella
Copy link
Contributor

vogella commented Jan 12, 2026

Thanks @danthe1st

@danthe1st danthe1st deleted the set-visible-region-flickering branch January 12, 2026 15:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants