-
Notifications
You must be signed in to change notification settings - Fork 198
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
fix InlinedAnnotationSupport#isInVisibleLines #2580
fix InlinedAnnotationSupport#isInVisibleLines #2580
Conversation
This pull request changes some projects for the first time in this development cycle.
An additional commit containing all the necessary changes was pushed to the top of this PR's branch. To obtain these changes (for example if you want to push more changes) either fetch from your fork or apply the git patch. Git patch
Further information are available in Common Build Issues - Missing version increments. |
Test Results 1 821 files + 1 821 1 821 suites +1 821 2h 0m 53s ⏱️ + 2h 0m 53s For more details on these failures, see this check. Results for commit c983d93. ± Comparison against base commit ce9874f. ♻️ This comment has been updated with latest results. |
problem scenario documented with testInlinedAnnotationSupportIsInLinesReturnsValidResultAfterDocumentChange. It only occurs on windows, not on macOS. |
isInVisibleLines uses a cached endOffset variable which is not correctly invalidated when ProjectionSupport is enabled. cached endOffset variable is only reset in callback documentAboutToBeChanged but not in documentChanged which is not sufficient. Scenario: 1. document.replace(...) is called 2. documentAboutToBeChanged is called and endOffset is set to null 3. source viewer repaint event is triggered (between documentAboutToBeChanged and documentChanged) and code minings are drawn, isInVisibleLines is called with the old not yet updated document and endOffset is set. The repaint event is only triggered in this timeslot when ProjectionSupport is installed on the SourceViewer. 4. documentChanged called; now document is up to date but endOffset cache contains outdated value of the old document 5. code minings at end of document are no longer rendered because isInVisibleLines returns false (which is not correct)
2ec90de
to
c983d93
Compare
failing test are unrelated |
isInVisibleLines uses a cached endOffset variable which is not correctly invalidated when ProjectionSupport is enabled.
cached endOffset variable is only reset in callback documentAboutToBeChanged but not in documentChanged which is not sufficient.
Scenario: