Skip to content

Commit c95d624

Browse files
Handle mouse events on Windows if we have a Windows 10 console (with ANSI support).
1 parent 93e2a5e commit c95d624

File tree

1 file changed

+2
-1
lines changed
  • prompt_toolkit/key_binding/bindings

1 file changed

+2
-1
lines changed

prompt_toolkit/key_binding/bindings/mouse.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -131,8 +131,9 @@ def _mouse(event: E) -> None:
131131
output = event.app.renderer.output
132132

133133
from prompt_toolkit.output.win32 import Win32Output
134+
from prompt_toolkit.output.windows10 import Windows10_Output
134135

135-
if isinstance(output, Win32Output):
136+
if isinstance(output, (Win32Output, Windows10_Output)):
136137
screen_buffer_info = output.get_win32_screen_buffer_info()
137138
rows_above_cursor = (
138139
screen_buffer_info.dwCursorPosition.Y - event.app.renderer._cursor_pos.y

0 commit comments

Comments
 (0)