Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Terminal text does not reflow if it's not visible when resizing the window #172281

Closed
akbyrd opened this issue Jan 24, 2023 · 8 comments
Closed
Assignees
Labels
*duplicate Issue identified as a duplicate of another issue(s) info-needed Issue requires more information from poster terminal-rendering

Comments

@akbyrd
Copy link
Contributor

akbyrd commented Jan 24, 2023

Type: Bug

When resizing the integrated terminal only the text that is visible reflows. Scrolling up to previous output will still be wrapped at the old line length. This makes it harder to scroll back and read through long output.

I think this can also truncate text at the end of lines, causing it to disappear entirely sometimes. But I haven't found a solid repro yet.

Here's my terminal after running a command with long output.
image

And here is my terminal after maximizing the window
image

VS Code version: Code 1.74.3 (97dec17, 2023-01-09T16:59:02.252Z)
OS version: Windows_NT x64 10.0.19043
Modes:
Sandboxed: No

System Info
Item Value
CPUs AMD Ryzen Threadripper PRO 3945WX 12-Cores (24 x 3993)
GPU Status 2d_canvas: enabled
canvas_oop_rasterization: disabled_off
direct_rendering_display_compositor: disabled_off_ok
gpu_compositing: enabled
multiple_raster_threads: enabled_on
opengl: enabled_on
rasterization: enabled
raw_draw: disabled_off_ok
skia_renderer: enabled_on
video_decode: enabled
video_encode: enabled
vulkan: disabled_off
webgl: enabled
webgl2: enabled
webgpu: disabled_off
Load (avg) undefined
Memory (System) 31.86GB (17.51GB free)
Process Argv
Screen Reader no
VM 0%
Extensions: none
@meganrogge
Copy link
Contributor

/duplicate #134448

@vscodenpa vscodenpa added the *duplicate Issue identified as a duplicate of another issue(s) label Jan 24, 2023
@akbyrd
Copy link
Contributor Author

akbyrd commented Jan 25, 2023

The linked issue appears to be very different. It is not related to text reflow. This issue is not duplicate of that one.

@meganrogge meganrogge reopened this Jan 25, 2023
@meganrogge meganrogge removed the *duplicate Issue identified as a duplicate of another issue(s) label Jan 25, 2023
@meganrogge
Copy link
Contributor

meganrogge commented Jan 25, 2023

Yep you're correct, separate issue. I cannot reproduce on Windows and it looks like xterm.js does reflow the whole buffer despite at one time considering an approach where only the viewport would be impacted xtermjs/xterm.js#4232. Do you have terminal.integrated.windowsEnableContpy enabled? If so, this is likely a conpty issue

@meganrogge meganrogge assigned Tyriar and unassigned meganrogge Jan 25, 2023
@meganrogge meganrogge added info-needed Issue requires more information from poster terminal-rendering labels Jan 25, 2023
@Tyriar
Copy link
Member

Tyriar commented Jan 25, 2023

This is tracked in xtermjs/xterm.js#4231

/duplicate

@Tyriar Tyriar closed this as completed Jan 25, 2023
@vscodenpa vscodenpa added the *duplicate Issue identified as a duplicate of another issue(s) label Jan 25, 2023
@akbyrd
Copy link
Contributor Author

akbyrd commented Jan 25, 2023

I just repro'd with the Insiders, no extensions and no user settings. I tested with terminal.integrated.windowsEnableConpty both enabled and disabled and it occurred with each. I tried maximizing and fullscreening - occurred with each.

I can test on other machines, though I'm moderately sure this happens on every PC I use.

image

I also managed to track down the issue with the buffer being corrupted and text being truncated.

  • Snap window to left side of screen
  • Produce some log spam in the console
  • Toggle fullscreen - on
  • Toggle fullscreen - off
  • Toggle fullscreen - on
  • Notice buffer is corrupted

It doesn't seem to be related to the size of the terminal panel when it's not maximized (inside vscode itself, not the entire application window)

image

This is the script I'm using to test:

$line = "Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat."

for (($i = 0); $i -lt 32; $i++)
{
    echo ($line + " " + $i)
}

VS Code version: Code - Insiders 1.75.0-insider (270c3b1, 2023-01-25T05:23:17.608Z)
OS version: Windows_NT x64 10.0.19043
Modes:
Sandboxed: Yes

System Info
Item Value
CPUs AMD Ryzen Threadripper PRO 3945WX 12-Cores (24 x 3993)
GPU Status 2d_canvas: enabled
canvas_oop_rasterization: disabled_off
direct_rendering_display_compositor: disabled_off_ok
gpu_compositing: enabled
multiple_raster_threads: enabled_on
opengl: enabled_on
rasterization: enabled
raw_draw: disabled_off_ok
skia_renderer: enabled_on
video_decode: enabled
video_encode: enabled
vulkan: disabled_off
webgl: enabled
webgl2: enabled
webgpu: disabled_off
Load (avg) undefined
Memory (System) 31.86GB (16.13GB free)
Process Argv --crash-reporter-id 8269a231-0af4-431f-8bf1-913cb9006f50
Screen Reader no
VM 0%
Extensions: none
A/B Experiments
vsliv695:30137379
vsins829:30139715
vsliv368cf:30146710
vsreu685:30147344
python383:30185418
vspor879:30202332
vspor708:30202333
vspor363:30204092
vstes627:30244334
vslsvsres303:30308271
pythonvspyl392:30422396
pythontb:30258533
pythonptprofiler:30281269
vshan820:30294714
pythondataviewer:30285072
vscod805cf:30301675
bridge0708:30335490
bridge0723:30353136
cmake_vspar411:30581797
vsaa593:30376534
pythonvs932:30404738
cppdebug:30492333
vscaat:30438846
vsclangdf:30492506
c4g48928:30535728
dsvsc012:30540252
pynewext54:30618038
pylantcb52:30590116
pyindex848:30611229
nodejswelcome1:30587009
pyind779:30611226
pythonsymbol12:30651887
a9j8j154:30646983

@akbyrd
Copy link
Contributor Author

akbyrd commented Jan 25, 2023

Should the buffer corruption be a separate issue? That's a lot more severe than text reflowing.

@Tyriar
Copy link
Member

Tyriar commented Jan 25, 2023

I believe they're both the same problem. In addition to this, conpty (Windows terminal pty emulation layer) re-draws the viewport at the bottom of the terminal and it can sometimes act up. This is out of our control unfortunately.

@akbyrd
Copy link
Contributor Author

akbyrd commented Jan 25, 2023

That's unfortunate. It makes the integrated terminal unreliable enough that I can't really trust it with anything non-trivial. I've always kept a separate terminal open and I guess I'll need to continue to do so.

For example, my current use case is merging changelists in perforce. I have a bunch of them to do in sequence so I start a merge, go edit some text while I wait for it to complete, then fullscreen the window and look through the output to make sure everything behaved.

I simply can't do that in the integrated terminal both because the text is a jumbled mess using half the available screen and because the output gets corrupted to the point I can't understand it or know that I haven't missed something important because it was truncated.

@github-actions github-actions bot locked and limited conversation to collaborators Mar 11, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
*duplicate Issue identified as a duplicate of another issue(s) info-needed Issue requires more information from poster terminal-rendering
Projects
None yet
Development

No branches or pull requests

4 participants