Bug Report
Does this issue occur when all extensions are disabled?: Yes
- VS Code Version: Latest
- OS Version: Linux / macOS
Steps to Reproduce
- Open a terminal
- Run a command that produces a long output line (longer than terminal width):
echo "This is a very long line that will wrap in the terminal when the terminal width is narrow enough to cause wrapping behavior"
- Observe the line wrapping in the terminal
- Click at the beginning of the line and drag to select it entirely (across the wrap point)
- Now resize the terminal panel (make it wider or narrower)
- Try to select the same content again
Expected Behavior
After resize, terminal content reflows (rewraps at the new width). Text selection should work correctly across the new reflow boundaries — selecting from one visual line to another should select the logically connected text.
Actual Behavior
After resize and reflow, text selection behaves incorrectly:
- Selecting across a reflow boundary sometimes selects only up to the boundary
- Copy (
Ctrl+C) of a selection that spans a reflow boundary may include an extra newline
- Or the selection visually highlights correctly but copies incorrect text
Impact
This affects workflows where:
- Terminal window is frequently resized (split panel, drag divider)
- Long command outputs (JSON, stack traces) wrap and then reflow
- Text is copied from terminal to paste elsewhere
Notes
Terminal reflow is a known complex area. The selection tracking needs to map visual positions to logical buffer positions after reflow. The xterm.js library handles reflow, and VS Code's selection coordinate translation may not account for all reflow scenarios.
Bug Report
Does this issue occur when all extensions are disabled?: Yes
Steps to Reproduce
Expected Behavior
After resize, terminal content reflows (rewraps at the new width). Text selection should work correctly across the new reflow boundaries — selecting from one visual line to another should select the logically connected text.
Actual Behavior
After resize and reflow, text selection behaves incorrectly:
Ctrl+C) of a selection that spans a reflow boundary may include an extra newlineImpact
This affects workflows where:
Notes
Terminal reflow is a known complex area. The selection tracking needs to map visual positions to logical buffer positions after reflow. The xterm.js library handles reflow, and VS Code's selection coordinate translation may not account for all reflow scenarios.