IDEA-226821: Scroll editor with mouse wheel while mouse cursor is over scroll bar

GitOrigin-RevId: 749530076597b08a517fa01e66ce280155fe741b
This commit is contained in:
Sergey Malenkov
2019-11-13 19:34:54 +00:00
committed by intellij-monorepo-bot
parent 398f99ffe3
commit 76dfb95899
@@ -899,7 +899,11 @@ public class EditorMarkupModelImpl extends MarkupModelImpl implements EditorMark
@Override
public void mouseWheelMoved(@NotNull MouseWheelEvent e) {
if (myEditorPreviewHint == null) return;
if (myEditorPreviewHint == null) {
// process wheel event by the parent scroll pane if no code lens
MouseEventAdapter.redispatch(e, e.getComponent().getParent());
return;
}
int units = e.getUnitsToScroll();
if (units == 0) return;
// Stop accumulating when the last or the first line has been reached as 'adjusted' position to show lens.