Skip to content

Commit ebe4530

Browse files
committed
Fix microsoft/vscode#232420: Python REPL cursor drifting
1 parent 9cb5ae7 commit ebe4530

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

python_files/pythonrc.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,9 @@ def __str__(self):
5252
result = ""
5353
# For non-windows allow recent_command history.
5454
if sys.platform != "win32":
55-
result = "{command_executed}{command_line}{command_finished}{prompt_started}{prompt}{command_start}".format(
55+
result = "{soh}{command_executed}{command_line}{command_finished}{prompt_started}{stx}{prompt}{soh}{command_start}{stx}".format(
56+
soh="\001",
57+
stx="\002",
5658
command_executed="\x1b]633;C\x07",
5759
command_line="\x1b]633;E;" + str(get_last_command()) + "\x07",
5860
command_finished="\x1b]633;D;" + str(exit_code) + "\x07",

0 commit comments

Comments
 (0)