microsoft / vscode

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

Minimap on the side not updating correctly when using keyboard shortcuts to move cursor to top of file #174284

Open tscizzlebg opened 1 year ago

tscizzlebg commented 1 year ago

Type: Bug

My keyboard mapping is such that alt+uparrow moves the cursor to the beginning of the file, and alt+downarrow moves the cursor to the end of the file.

When I use these shortcuts to move the cursor to the end, and then back to the beginning, then I hover my mouse over the minimap, the issue occurs. Because the cursor is at the beginning of the file and my viewport is also scrolled all the way up, I expect the faded area of the minimap to be at the top when I hover the mouse, but instead it is at the bottom. I can still click on the minimap and operate it correctly, but it is jarring to think I'm at the top, mouse over the minimap and have it say I'm not, but then realize that the minimap is wrong and I am actually at the top.

Hope this is helpful!

VS Code version: Code 1.75.1 (441438abd1ac652551dbe4d408dfcec8a499b8bf, 2023-02-08T21:35:30.018Z) OS version: Linux x64 5.15.0-58-generic snap Modes: Sandboxed: No

System Info |Item|Value| |---|---| |CPUs|Intel(R) Core(TM) i7-10875H CPU @ 2.30GHz (16 x 2300)| |GPU Status|2d_canvas: unavailable_software
canvas_oop_rasterization: disabled_off
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_renderer: enabled_on
video_decode: disabled_software
video_encode: disabled_software
vulkan: disabled_off
webgl: unavailable_software
webgl2: unavailable_software
webgpu: disabled_off| |Load (avg)|2, 1, 1| |Memory (System)|62.64GB (57.35GB free)| |Process Argv|--no-sandbox ../.. --crash-reporter-id c30174fa-627e-4fa6-829c-df79916dc53b| |Screen Reader|no| |VM|0%| |DESKTOP_SESSION|ubuntu| |XDG_CURRENT_DESKTOP|Unity| |XDG_SESSION_DESKTOP|ubuntu| |XDG_SESSION_TYPE|wayland|
Extensions (10) Extension|Author (truncated)|Version ---|---|--- prettier-vscode|esb|9.10.4 isort|ms-|2022.8.0 python|ms-|2023.2.0 vscode-pylance|ms-|2023.2.20 jupyter|ms-|2023.1.2010391206 jupyter-keymap|ms-|1.0.0 jupyter-renderers|ms-|1.0.14 vscode-jupyter-cell-tags|ms-|0.1.6 vscode-jupyter-slideshow|ms-|0.1.5 makefile-tools|ms-|0.6.0
A/B Experiments ``` vsliv368:30146709 vsreu685:30147344 python383cf:30185419 vspor879:30202332 vspor708:30202333 vspor363:30204092 vslsvsres303:30308271 pythonvspyl392:30443607 vserr242cf:30382550 pythontb:30283811 vsjup518:30340749 pythonptprofiler:30281270 vsdfh931cf:30280410 vshan820:30294714 vstes263:30335439 vscorecescf:30445987 pythondataviewer:30285071 vscod805cf:30301675 binariesv615:30325510 bridge0708:30335490 bridge0723:30353136 cmake_vspar411:30581797 vsaa593:30376534 pythonvs932:30410667 cppdebug:30492333 vsclangdc:30486549 c4g48928:30535728 dsvsc012cf:30540253 pynewext54:30660299 azure-dev_surveyonecf:30548226 pyindex848cf:30577861 nodejswelcome1:30587005 3biah626:30602489 f6dab269:30613381 pythonsymbol12cf:30657549 2i9eh265:30646982 vsccsb:30659829 ```
alexdima commented 1 year ago

Could you please also share a screen recording demonstrating the problem?

tscizzlebg commented 1 year ago

Sure!

https://user-images.githubusercontent.com/54290732/221030264-8743b6fd-f0b3-4353-8452-34c00021dac4.mp4

At ~0:05, I show the minimap working fine. At ~0:08, I use alt+downarrow to move the cursor to the end of the file, and alt+uparrow to move the cursor to the top of the file. At ~0:11, I mouse over the minimap and the highlighted region is at the bottom, and I attempt to drag it around but it doesn't move or do anything. I then click elsewhere in the minimap and things return to correct behavior.