mbien commented on PR #7009: URL: https://github.com/apache/netbeans/pull/7009#issuecomment-1914781309
> Suspect caused by this change - https://bugs.openjdk.org/browse/JDK-6911375 / https://github.com/openjdk/jdk19u/commit/832729b41e690d6f05da71997bbe2a74b2d6dada ?? We were perhaps reliant on a JDK bug that was fixed? I don't want to confuse anyone, but the workaround for this bug is here: https://github.com/apache/netbeans/blob/4290a3d300090d659dc6d3ecf74e746940d9b919/ide/diff/src/org/netbeans/modules/diff/builtin/visualizer/editable/DiffViewManager.java#L111-L121 this is a different scroll pane however. the question is what the editor was supposed to do if you put the mouse on the line numbers and scroll. The regular editor does scroll, so I suppose it was the original intention too for the diff view - however even on JDK 11 this is not the case. Fact is that adding an empty mouse wheel listener, already restores the old behavior on JDK 19+: nothing happens on scroll over the line number bar. I can't remember of an instance that adding an empty listener did ever change behavior in swing before! This PR goes one little step further and delegates the scroll events to the editor, which has all the scroll logic and in turn scrolls all linked components -> diff view behaves like the regular editor on all JDKs. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected] --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected] For further information about the NetBeans mailing lists, visit: https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists
