-
Notifications
You must be signed in to change notification settings - Fork 230
disable redrawing when setting visible region to prevent flickering #3457
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
disable redrawing when setting visible region to prevent flickering #3457
Conversation
...eclipse.jface.text/projection/org/eclipse/jface/text/source/projection/ProjectionViewer.java
Outdated
Show resolved
Hide resolved
c46953f to
bac8d3d
Compare
bac8d3d to
a2e088f
Compare
a2e088f to
7f0ce1d
Compare
6d4731e to
0c8d2ab
Compare
|
(only rebased/updated copyright headers, still waiting for re-review) |
0c8d2ab to
0df6f52
Compare
vogella
left a comment
There was a problem hiding this 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.
|
Thanks @danthe1st |
When
setVisibleRegionis 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.