Skip to content

Commit 011a7ca

Browse files
Fix allowed character insert escape
1 parent 771b387 commit 011a7ca

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

Lib/test/test_pyrepl/test_pyrepl.py

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1805,13 +1805,13 @@ def test_no_newline(self):
18051805
self.assertEqual(exit_code, 0)
18061806

18071807
# Define escape sequences that don't affect cursor position or visual output
1808-
bracketed_paste_mode = r'\x1b\[\?2004[hl]' # Enable/disable bracketed paste
1809-
application_cursor_keys = r'\x1b\[\?1[hl]' # Enable/disable application cursor keys
1810-
application_keypad_mode = r'\x1b[=>]' # Enable/disable application keypad
1811-
insert_character = r'\x1b\[1@(?=[ -~])' # Insert exactly 1 char (safe form)
1812-
cursor_visibility = r'\x1b\[\?25[hl]' # Show/hide cursor
1813-
cursor_blinking = r'\x1b\[\?12[hl]' # Start/stop cursor blinking
1814-
device_attributes = r'\x1b\[\?[01]c' # Device Attributes (DA) queries/responses
1808+
bracketed_paste_mode = r'\x1b\[\?2004[hl]' # Enable/disable bracketed paste
1809+
application_cursor_keys = r'\x1b\[\?1[hl]' # Enable/disable application cursor keys
1810+
application_keypad_mode = r'\x1b[=>]' # Enable/disable application keypad
1811+
insert_character = r'\x1b\[(?:1)?@(?=[ -~])' # Insert exactly 1 char (safe form)
1812+
cursor_visibility = r'\x1b\[\?25[hl]' # Show/hide cursor
1813+
cursor_blinking = r'\x1b\[\?12[hl]' # Start/stop cursor blinking
1814+
device_attributes = r'\x1b\[\?[01]c' # Device Attributes (DA) queries/responses
18151815

18161816
safe_escapes = re.compile(
18171817
f'{bracketed_paste_mode}|'

0 commit comments

Comments
 (0)