microsoft / vscode

Visual Studio Code
https://code.visualstudio.com
MIT License
164.21k stars 29.29k forks source link

Terminal stops redrawing when logged in as 'root' #66217

Closed bitfield closed 5 years ago

bitfield commented 5 years ago

Issue Type: Bug

  1. Activate the integrated terminal.
  2. Run sudo su - to become root.
  3. Type a command which generates enough output to cause the screen to scroll (e.g. man --help)
  4. Press Shift-Cmd-Up to select all text between the cursor position and the previous command.
  5. The last few lines of output are highlighted, but the terminal is now unresponsive.
  6. Pressing keys does not display any text. However, the terminal is still working, even though you can't see what you're typing, or the output. It just appears to be unable to redraw.
  7. 'Kill Active Terminal Instance' seems to be the only way to clear this.

VS Code version: Code 1.30.1 (dea8705087adb1b5e5ae1d9123278e178656186a, 2018-12-18T18:05:00.654Z) OS version: Darwin x64 15.6.0

System Info |Item|Value| |---|---| |CPUs|Intel(R) Core(TM) i7-3615QM CPU @ 2.30GHz (8 x 2300)| |GPU Status|2d_canvas: enabled
checker_imaging: disabled_off
flash_3d: enabled
flash_stage3d: enabled
flash_stage3d_baseline: enabled
gpu_compositing: enabled
multiple_raster_threads: enabled_on
native_gpu_memory_buffers: enabled
rasterization: enabled
video_decode: enabled
video_encode: enabled
webgl: enabled
webgl2: enabled| |Load (avg)|2, 2, 2| |Memory (System)|16.00GB (0.02GB free)| |Process Argv|-psn_0_57358| |Screen Reader|no| |VM|0%|
Extensions (48) Extension|Author (truncated)|Version ---|---|--- language-x86-64-assembly|13x|2.2.11 vscode-timer|Max|1.0.0 sort-lines|Tyr|1.7.0 google-search-ext|ade|0.2.1 hugofy|akm|0.1.0 spellright|ban|3.0.22 Nix|bbe|1.0.1 hiera-eyaml|bra|1.0.1 language-hugo-vscode|bud|0.11.0 better-toml|bun|0.3.2 transformer|dak|1.6.0 vscode-dash|dee|2.0.0 vscode-faker|dee|1.3.0 gitlens|eam|9.4.1 LogFileHighlighter|emi|2.4.2 git-project-manager|fel|1.7.1 docker-explorer|for|0.1.6 macros|ged|1.2.1 vscode-pull-request-github|Git|0.3.2 todo-tree|Gru|0.0.112 jsonnet|hep|0.1.0 kubernetes-snippets|ipe|0.1.9 asciidoctor-vscode|joa|2.3.0 puppet-vscode|jpo|0.15.0 vscode-insertdatestring|jsy|2.2.3 vscode-circleci|jva|0.5.0 wordcounter|kir|1.4.0 VS-code-vagrantfile|mar|0.0.7 terraform|mau|1.3.7 vscode-kubernetes-tools|ms-|0.1.14 python|ms-|2018.12.1 cpptools|ms-|0.20.1 Go|ms-|0.8.0 incrementor|nms|0.1.0 advanced-new-file|pat|1.2.0 vscode-docker|Pet|0.5.0 polacode|pnp|0.2.2 ruby|reb|0.21.0 vscode-yaml|red|0.2.1 rust|rus|0.5.3 partial-diff|ryu|1.4.0 code-settings-sync|Sha|3.2.4 rewrap|stk|1.9.1 ghosttext|tok|1.1.0 vscode-todo-highlight|way|1.0.4 jinja|who|0.0.8 better-align|wwm|1.1.6 FilterText|yhi|0.0.11
Tyriar commented 5 years ago

@bitfield can you test this out on the latest insiders build https://code.visualstudio.com/insiders/ while launching with code-insiders --disable-extensions?

bitfield commented 5 years ago

I can confirm this is fixed in the current Insiders, with or without extensions disabled.

In Code 1.30, I can reliably reproduce this by:

  1. Open terminal
  2. Type man --help twice.
  3. Press Shift-Cmd-Up.

The terminal is now stuck (though as I say, you can still type commands, you just can't see them or the output).

This may be font-related, as the problem occurs when the following terminal fonts are selected:

But not when the following are selected: