Skip to content

Commit e55cd1b

Browse files
Use ANSI based mouse processing and bracketed paste on Windows. (#1961)
Follow-up of #1958 On Windows, we should now enable bracketed paste if vt100 support is available.
1 parent 02b32fa commit e55cd1b

File tree

1 file changed

+9
-4
lines changed

1 file changed

+9
-4
lines changed

Diff for: src/prompt_toolkit/output/windows10.py

+9-4
Original file line numberDiff line numberDiff line change
@@ -66,15 +66,20 @@ def responds_to_cpr(self) -> bool:
6666
return False # We don't need this on Windows.
6767

6868
def __getattr__(self, name: str) -> Any:
69+
# NOTE: Now that we use "virtual terminal input" on
70+
# Windows, both input and output are done through
71+
# ANSI escape sequences on Windows. This means, we
72+
# should enable bracketed paste like on Linux, and
73+
# enable mouse support by calling the vt100_output.
6974
if name in (
7075
"get_size",
7176
"get_rows_below_cursor_position",
72-
"enable_mouse_support",
73-
"disable_mouse_support",
7477
"scroll_buffer_to_prompt",
7578
"get_win32_screen_buffer_info",
76-
"enable_bracketed_paste",
77-
"disable_bracketed_paste",
79+
# "enable_mouse_support",
80+
# "disable_mouse_support",
81+
# "enable_bracketed_paste",
82+
# "disable_bracketed_paste",
7883
):
7984
return getattr(self.win32_output, name)
8085
else:

0 commit comments

Comments
 (0)