Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 98aaab1

Browse filesBrowse files
authored
Tweak Python shell integration for lsp completion (#25082)
Resolves: #25012
1 parent c246e0e commit 98aaab1
Copy full SHA for 98aaab1

File tree

Expand file treeCollapse file tree

2 files changed

+4
-4
lines changed
Filter options
Expand file treeCollapse file tree

2 files changed

+4
-4
lines changed

‎python_files/pythonrc.py

Copy file name to clipboardExpand all lines: python_files/pythonrc.py
+2-2Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -53,13 +53,13 @@ def __str__(self):
5353
result = ""
5454
# For non-windows allow recent_command history.
5555
if sys.platform != "win32":
56-
result = "{command_line}{command_finished}{prompt_started}{prompt}{command_start}{command_executed}".format(
56+
result = "{command_executed}{command_line}{command_finished}{prompt_started}{prompt}{command_start}".format(
57+
command_executed="\x1b]633;C\x07",
5758
command_line="\x1b]633;E;" + str(get_last_command()) + "\x07",
5859
command_finished="\x1b]633;D;" + str(exit_code) + "\x07",
5960
prompt_started="\x1b]633;A\x07",
6061
prompt=original_ps1,
6162
command_start="\x1b]633;B\x07",
62-
command_executed="\x1b]633;C\x07",
6363
)
6464
else:
6565
result = "{command_finished}{prompt_started}{prompt}{command_start}{command_executed}".format(

‎python_files/tests/test_shell_integration.py

Copy file name to clipboardExpand all lines: python_files/tests/test_shell_integration.py
+2-2Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ def test_decoration_success():
1717
if sys.platform != "win32" and (not is_wsl):
1818
assert (
1919
result
20-
== "\x1b]633;E;None\x07\x1b]633;D;0\x07\x1b]633;A\x07>>> \x1b]633;B\x07\x1b]633;C\x07"
20+
== "\x1b]633;C\x07\x1b]633;E;None\x07\x1b]633;D;0\x07\x1b]633;A\x07>>> \x1b]633;B\x07"
2121
)
2222
else:
2323
pass
@@ -32,7 +32,7 @@ def test_decoration_failure():
3232
if sys.platform != "win32" and (not is_wsl):
3333
assert (
3434
result
35-
== "\x1b]633;E;None\x07\x1b]633;D;1\x07\x1b]633;A\x07>>> \x1b]633;B\x07\x1b]633;C\x07"
35+
== "\x1b]633;C\x07\x1b]633;E;None\x07\x1b]633;D;1\x07\x1b]633;A\x07>>> \x1b]633;B\x07"
3636
)
3737
else:
3838
pass

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.