-
-
Notifications
You must be signed in to change notification settings - Fork 33.3k
Open
Labels
stdlibStandard Library Python modules in the Lib/ directoryStandard Library Python modules in the Lib/ directorytopic-IDLEtype-bugAn unexpected behavior, bug, or errorAn unexpected behavior, bug, or error
Description
Bug report
Bug description:
I know that there isn't a horizontal scrollbar for a reason but I believe that horizontally scrolling on a touchpad/trackpad should still scroll the IDLE editor horizontally. Right now trying to horizontally scroll a file, scrolls it vertically which I find very counter intuitive. The reason for this behaviour is in Lib/idlelib/tree.py (which is used in Lib/idlelib/editor.py):
def wheel_event(event, widget=None):
...
up = {EventType.MouseWheel: event.delta > 0,
EventType.ButtonPress: event.num == 4}
lines = -5 if up[event.type] else 5
widget = event.widget if widget is None else widget
widget.yview(SCROLL, lines, 'units')
return 'break'The function doesn't respect the direction of scrolling and instead just scrolls vertically (yview). I know this is a minor bug but it's annoying me so much when IDLE tries to scroll vertically when I am scrolling horizontally
CPython versions tested on:
CPython main branch
Operating systems tested on:
Linux, Windows
Linked PRs
Metadata
Metadata
Assignees
Labels
stdlibStandard Library Python modules in the Lib/ directoryStandard Library Python modules in the Lib/ directorytopic-IDLEtype-bugAn unexpected behavior, bug, or errorAn unexpected behavior, bug, or error
Projects
Status
No status