Skip to content

Improper line wrapping in Python terminal #25502

Closed

Description

@LarsonPaul1

Type: Bug

Behaviour

When using the terminal to run a Python shell in a project with Python files, the first instance of line wrapping in a line does not work correctly. Wrapping occurs early, and the "next line" appears overlapping the previous line.

Steps to reproduce:

  1. Open a project containing at least one .py file.
  2. Open the terminal using CTRL-`.
  3. Run python.
  4. If the nearest line to the input prompt reads "Ctrl click to launch VS Code Native REPL", the bug occurs.
  5. Enter characters until the line wraps. If the bug does not occur on the first line of input, press enter and enter characters again.

Image

Diagnostic data

Extension version: 2025.14.0
VS Code version: Code 1.104.2 (e3a5acfb517a443235981655413d566533107e92, 2025-09-24T11:21:37.073Z)
OS version: Linux x64 6.14.0-32-generic snap
Modes:

  • Python version (& distribution if applicable, e.g. Anaconda): 3.12.3
  • Type of virtual environment used (e.g. conda, venv, virtualenv, etc.): Venv
  • Value of the python.languageServer setting: Default
User Settings


languageServer: "Jedi"

Installed Extensions
Extension Name Extension Id Version
js-debug ms- 1.104.0
js-debug-companion ms- 1.1.3
python ms- 2025.14.0
vscode-js-profile-table ms- 1.0.10
System Info
Item Value
CPUs Intel(R) Core(TM) i5-10400 CPU @ 2.90GHz (12 x 4000)
GPU Status 2d_canvas: unavailable_software
direct_rendering_display_compositor: disabled_off_ok
gpu_compositing: disabled_software
multiple_raster_threads: enabled_on
opengl: disabled_off
rasterization: disabled_software
raw_draw: disabled_off_ok
skia_graphite: disabled_off
trees_in_viz: disabled_off
video_decode: disabled_software
video_encode: disabled_software
vulkan: disabled_off
webgl: unavailable_software
webgl2: unavailable_software
webgpu: disabled_off
webnn: unavailable_software
Load (avg) 3, 2, 2
Memory (System) 15.37GB (9.19GB free)
Process Argv --no-sandbox --force-user-env --crash-reporter-id ce59dcdc-2074-4244-b028-44591d65a135 --crash-reporter-id ce59dcdc-2074-4244-b028-44591d65a135
Screen Reader no
VM 0%
DESKTOP_SESSION ubuntu
XDG_CURRENT_DESKTOP Unity
XDG_SESSION_DESKTOP ubuntu
XDG_SESSION_TYPE wayland
A/B Experiments
vsliv368:30146709
binariesv615:30325510
nativeloc1:31344060
dwcopilot:31170013
dwoutputs:31242946
copilot_t_ci:31333650
e5gg6876:31282496
pythonrdcb7:31342333
usemplatestapi:31297334
aj953862:31281341
cs4_fixed:31391938
nes-set-on:31351930
6abeh943:31336334
envsactivate1:31353494
0cj2b977:31352657
gendocstringf:31395206
gaj49834:31362110
cloudbuttont:31379625
todos-0:31390406
multireplacestringcontrol:31393296
control_gpt5applypatchexclusively:31394180
3efgi100_wstrepl:31382709
trigger-command-fix:31379601
auto_model_enabled:31385282
use-responses-api:31390855
86221569:31396493

Activity

  1. LarsonPaul1 commented on Oct 3, 2025

    @LarsonPaul1
    Author

    Setting terminal.integrated.shellIntegration.enabled python.terminal.shellIntegration.enabled to false appears to prevent this behaviour.

    Possibly related to #25467.

  2. anthonykim1 commented on Oct 6, 2025

    @anthonykim1

    what if you turn on terminal.integrated.shellIntegration.enabled to true, but turn off python.terminal.shellIntegration.enabled to false? LarsonPaul1

  3. LarsonPaul1 commented on Oct 7, 2025

    @LarsonPaul1
    Author

    Setting terminal.integrated.shellIntegration.enabled to false appears to prevent this behaviour.

    This was incorrect. I actually had python.terminal.shellIntegration.enabled set to false. Setting it to true causes the issue regardless of the value of terminal.integrated.shellIntegration.enabled.

  4. anthonykim1 commented on Oct 17, 2025

    @anthonykim1

    LarsonPaul1 So if you have terminal.integrated.shellIntegration.enabled disabled and have python.terminal.shellIntegration.enabled to true, you are still able to repro?

  5. LarsonPaul1 commented on Oct 18, 2025

    @LarsonPaul1
    Author

    Yes. If python.terminal.shellIntegration.enabled is true, the error occurs whether terminal.integrated.shellIntegration.enabled is true or false or not defined.

  6. iBug commented on Nov 6, 2025

    @iBug

    This will probably be fixed by #25521. Can you test the change locally (apply it to the file $PYTHONSTARTUP) and comment on #25521 if it helps?

  7. LarsonPaul1 commented on Nov 6, 2025

    @LarsonPaul1
    Author

    With $PYTHONSTARTUP pointing to the changed pythonrc.py and python.terminal.shellIntegration.enabled: true, I had no issues.

  8. added
    bugIssue identified by VS Code Team member as probable bug
    and removed
    info-neededIssue requires more information from poster
    on Nov 7, 2025
  9. eleanorjboyd commented on Dec 3, 2025

    @eleanorjboyd
    Member

    Anthony Kim (@anthonykim1) can you clarify which settings should be enabled and their values to correctly verify this

  10. anthonykim1 commented on Dec 3, 2025

    @anthonykim1

    Verification steps:

    • set python.terminal.shellIntegration.enabled to true
    • Open Python REPL by typing python or python3 in your terminal
    • Type very long string of characters, make sure it doesnt get wrongly wrapped like in video.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

area-terminalbugIssue identified by VS Code Team member as probable bugverifiedVerification succeeded

Type

No type

Projects

No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions