microsoft / vscode

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

Minimap out of sync with scrollbar #36622

Closed CzBuCHi closed 7 years ago

CzBuCHi commented 7 years ago

Not sure if this belongs here but it is issue after all....

Minimap gets out of sync with scroll position. ( left image - u can crearly see, that scrollbar handle is far lower than minimap 'handle' ... )

Also error markers ( in green circle ) are in scope of scrollbar and not minimap ... i usually center minimap view to that red box, get confused for a while and then move to correct place

Can be minimap changed to look similar to Visual Studio (right image) - basically hide 'default' scrollbar and render custom scrollbar with minimap inside?

minimap

alexdima commented 7 years ago

Visual Studio

In Visual Studio, the minimap and the scrollbar share the same geometry. For example, in an editor of 800px height, the minimap is always 800px high:

Visual Studio Code

In Visual Studio Code, the minimap and the scrollbar do not share the same geometry. In Visual Studio Code, each line gets a fixed amount of pixels reserved in the minimap, and the minimap height is made variable. For example, in an editor of 800px height, where each line gets 2px in the minimap (a low DPI display):

You can think of the minimap in VSCode as a 10x zoomed-out version of your code. If in the regular editor, a line takes 20px in height, in the minimap a line takes 2px.

You can upvote that we implement the Visual Studio model in #21849