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 scrollbar moves to the top after running command #243723

Closed
joshka opened this issue Mar 17, 2025 · 9 comments
Closed

Terminal scrollbar moves to the top after running command #243723

joshka opened this issue Mar 17, 2025 · 9 comments
Assignees
Labels
*duplicate Issue identified as a duplicate of another issue(s) terminal-rendering

Comments

@joshka
Copy link

joshka commented Mar 17, 2025

Type: Bug

Unsure of the exact steps, this happens intermittently (but frequently) after running various commands - e.g. cargo.

After a command runs, the scollbar is set to the top most location, but the location of the view isn't aligned to the scrollbar location. This makes it impossible to scroll up to see the previous information of the command without first scrolling all the way to the bottom or by hitting enter to make the terminal jump to the next line.

VS Code version: Code 1.98.1 (2fc07b8, 2025-03-10T15:38:08.854Z)
OS version: Darwin arm64 24.3.0
Modes:

System Info
Item Value
CPUs Apple M2 Max (12 x 2400)
GPU Status 2d_canvas: enabled
canvas_oop_rasterization: enabled_on
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_graphite: disabled_off
video_decode: enabled
video_encode: enabled
webgl: enabled
webgl2: enabled
webgpu: enabled
webnn: disabled_off
Load (avg) 2, 2, 3
Memory (System) 96.00GB (22.73GB free)
Process Argv --log rust-lang.rust-analyzer=debug --crash-reporter-id f8fdf478-fe1f-41da-ba33-7aee2edd6a96
Screen Reader no
VM 0%
Extensions (117)
Extension Author (truncated) Version
Bookmarks ale 13.5.0
tsl-problem-matcher amo 0.6.2
Handlebars and 0.4.1
vscode-json and 1.5.2
vite ant 0.2.5
gitstash art 5.2.0
astro-vscode ast 2.15.4
tailwind-docs aus 2.1.0
vscode-node-readme ben 3.0.2
procfile ben 1.1.7
github-markdown-preview bie 0.3.0
markdown-checkbox bie 0.4.0
markdown-emoji bie 0.3.1
markdown-footnotes bie 0.1.1
markdown-mermaid bie 1.27.0
markdown-preview-github-styles bie 2.1.0
markdown-yaml-preamble bie 0.1.0
vscode-tailwindcss bra 0.14.9
node-snippets chr 1.4.0
npm-intellisense chr 1.4.5
path-intellisense chr 2.10.0
gitignore cod 0.10.0
vscode-markdownlint Dav 0.59.0
vscode-eslint dba 3.0.10
vscode-npm-source dku 1.0.0
githistory don 0.6.20
python-environment-manager don 1.2.7
python-extension-pack don 1.7.0
xml Dot 2.5.1
EditorConfig Edi 0.17.2
LogFileHighlighter emi 3.4.0
prettier-vscode esb 11.0.0
dependi fil 0.7.13
vscode-npm fkn 3.3.0
vscode-glass fou 0.15.6
shell-format fox 7.2.5
codespaces Git 1.17.3
copilot Git 1.284.0
copilot-chat Git 0.25.1
remotehub Git 0.64.0
vscode-github-actions git 0.27.1
vscode-pull-request-github Git 0.107.2025031304
go gol 0.46.1
vhs gri 0.0.4
rest-client hum 0.25.1
rust-feature-toggler its 0.1.0
search-node-modules jas 1.3.0
rust-doc-viewer JSc 4.2.0
vsc-python-indent Kev 1.21.0
vscode-just kok 2.1.0
Kotlin mat 1.7.1
workspace-storage-cleanup meh 1.11.5
prettify-json moh 0.0.3
vscode-azureresourcegroups ms- 0.10.8
vscode-docker ms- 1.29.4
vscode-dotnet-runtime ms- 2.2.8
debugpy ms- 2025.4.1
isort ms- 2023.10.1
python ms- 2025.2.0
vscode-pylance ms- 2025.3.2
jupyter ms- 2025.2.0
jupyter-keymap ms- 1.1.2
jupyter-renderers ms- 1.1.0
vscode-jupyter-cell-tags ms- 0.1.9
vscode-jupyter-slideshow ms- 0.1.6
remote-containers ms- 0.401.0
remote-ssh ms- 0.118.0
remote-ssh-edit ms- 0.87.0
remote-wsl ms- 0.88.5
vscode-remote-extensionpack ms- 0.26.0
cmake-tools ms- 1.20.53
cpptools ms- 1.23.6
cpptools-extension-pack ms- 1.3.1
live-server ms- 0.4.15
makefile-tools ms- 0.12.17
remote-explorer ms- 0.4.3
remote-repositories ms- 0.42.0
remote-server ms- 1.5.2
vscode-serial-monitor ms- 0.13.1
gradle-language nac 0.2.3
vscode-jest Ort 6.4.0
cargo pan 0.3.0
vscode-versionlens pfl 1.16.2
vscode-protolint ple 0.8.0
sqlite-viewer qwt 0.10.5
java red 1.40.0
vscode-xml red 0.28.0
vscode-yaml red 1.17.0
vscode-rhai rha 0.6.8
rust-analyzer rus 0.4.2343
vscode-coverage-gutters rya 2.13.0
ruby-lsp Sho 0.9.7
rewrap stk 1.16.3
ninja sur 0.0.1
node-pack Swe 0.1.16
vscode-tailscale Tai 1.0.0
even-better-toml tam 0.21.2
cmake twx 0.0.17
vscode-mdx uni 1.8.13
errorlens use 3.24.0
vscode-lldb vad 1.11.4
intellicode-api-usage-examples Vis 0.2.9
vscodeintellicode Vis 1.3.2
explorer vit 1.16.0
vscode-conventional-commits viv 1.26.0
vscode-gradle vsc 3.16.4
vscode-java-debug vsc 0.58.1
vscode-java-dependency vsc 0.24.1
vscode-java-pack vsc 0.29.0
vscode-java-test vsc 0.43.0
vscode-maven vsc 0.44.0
volar Vue 2.2.8
gitblame wad 11.1.2
ReactSnippets xab 2.4.0
material-theme zhu 3.19.0
vscode-open-in-github ziy 1.3.6
vscode-proto3 zxh 0.5.5

(3 theme extensions excluded)

A/B Experiments
vsliv368cf:30146710
vspor879:30202332
vspor708:30202333
vspor363:30204092
vscod805:30301674
binariesv615:30325510
py29gd2263:31024239
vscaac:30438847
c4g48928:30535728
azure-dev_surveyone:30548225
962ge761:30959799
h48ei257:31000450
pythontbext0:30879054
cppperfnew:31000557
dwnewjupytercf:31046870
nativerepl1:31139838
pythonrstrctxt:31112756
nativeloc1:31192215
iacca1:31171482
5fd0e150:31155592
dwcopilot:31170013
6074i472:31201624
dwoutputs:31242946
customenabled:31248079
hdaa2157:31222309
copilot_t_ci:31222730
f5992895:31259995
jda6j935:31233686
bgtreat:31257678
fh1c7952:31258891
4gafe986:31257590
h6j33387:31256343
0339e702:31259951

Copy link

Thanks for creating this issue! It looks like you may be using an old version of VS Code, the latest stable release is 1.98.2. Please try upgrading to the latest version and checking whether this issue remains.

Happy Coding!

@joshka
Copy link
Author

joshka commented Mar 17, 2025

Will monitor and reopen if this happens in 1.98.2

@joshka joshka closed this as completed Mar 17, 2025
@joshka joshka reopened this Mar 19, 2025
@joshka
Copy link
Author

joshka commented Mar 19, 2025

Still appears to be a problem in 1.98.2

@meganrogge
Copy link
Contributor

a gif would help

@meganrogge meganrogge added the info-needed Issue requires more information from poster label Mar 20, 2025
@joshka
Copy link
Author

joshka commented Mar 20, 2025

a gif would help

I'll grab one next time it happens, and I'll try find some ways to reliably trigger it. Running cargo or bacon in the terminal are things which sometimes make this happen.

@meganrogge
Copy link
Contributor

sounds good

@evolbug
Copy link

evolbug commented Mar 25, 2025

I've stumbled upon this and recorded a replication. I suspect it's something to do with ANSI escape code use / tty nesting breaking scroll position restoration under some circumstances.

Replicates reliably for me using docker+alpine+htop.

Commands:

docker run --rm -it alpine:3.21 sh
apk add htop
htop
issue.mp4

@joshka
Copy link
Author

joshka commented Mar 25, 2025

Yeah, I'm a maintainer of Ratatui (a rust TUI framework), and regularly run tuis in the terminal that set raw mode and enter the alternate screen, as well as move the cursor regularly. They generally reset the terminal back to cooked state and leave the alternate screen on exit. These are likely to be confounding factors, but I haven't yet seen a reproduceable problem at a time where I can make a note of it yet. Still watching though.

@meganrogge meganrogge assigned Tyriar and unassigned meganrogge Mar 26, 2025
@meganrogge meganrogge added terminal-rendering and removed info-needed Issue requires more information from poster labels Mar 26, 2025
@Tyriar
Copy link
Member

Tyriar commented Mar 26, 2025

/duplicate #224750

@Tyriar Tyriar closed this as completed Mar 26, 2025
@vs-code-engineering vs-code-engineering bot added the *duplicate Issue identified as a duplicate of another issue(s) label Mar 26, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
*duplicate Issue identified as a duplicate of another issue(s) terminal-rendering
Projects
None yet
Development

No branches or pull requests

4 participants