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

"editor.minimap.mode": "contain" not behaving as expected with wrapping on #90990

Closed
gjsjohnmurray opened this issue Feb 19, 2020 · 4 comments
Closed
Assignees
Labels
bug Issue identified by VS Code Team member as probable bug editor-minimap Code/Text minimap widget issues verified Verification succeeded
Milestone

Comments

@gjsjohnmurray
Copy link
Contributor

Issue Type: Bug

Testing #90808 by @alexdima

I set "editor.minimap.mode": "contain" and opened a document for which, prior to this new feature landing, the minimap would extend off the bottom of the window. My actual doc was docs\editor\command-line.md from the microsoft/vscode-docs repo.

With "contain" the minimap behaved as though I had set "actual" (or simply not defined the setting at all), in that it scrolled off the bottom. To get the expected behaviour I had to set "cover".

VS Code version: Code - Insiders 1.43.0-insider (c947241, 2020-02-19T09:02:21.024Z)
OS version: Windows_NT x64 10.0.18363

@alexdima
Copy link
Member

@gjsjohnmurray I am really looking forward to ideas on how to name these settings and perhaps how to improve their documentation, but what you have observed is correct:

  • cover: the minimap is stretched or shrinked (sampling) such that it always has its contents take the height of the editor.
  • contain: the minimap is never stretched, just shrinked (sampling) such that it never has its contents take more theight than the editor.
  • actual: the minimap is never stretched, nor shrinked, each line in the minimap gets a height attributed to it, like 2px, and then the line count determines the height of the minimap content.

Please let me know if you have other ideas for the names or for the descriptions, the current settings I took with a lot of inspiration to the CSS background-image properties.

@alexdima alexdima added the info-needed Issue requires more information from poster label Feb 19, 2020
@gjsjohnmurray
Copy link
Contributor Author

@alexdima I like the names you have chosen, and I was able to understand the descriptions you gave them. But here is a GIF showing the same document, first in "actual" mode, then in "cover" and finally in "contain". I show the Settings page before each demonstration.

junk

I don't understand why "contain" behaves like "actual" (notice how the minimap scroller isn't the same size as the adjacent scrollbar scroller). I expected "contain" to be the same as "cover".

@alexdima
Copy link
Member

Thank you, I can reproduce! It reproduces when using wrapping

@alexdima alexdima changed the title "editor.minimap.mode": "contain" not behaving as expected "editor.minimap.mode": "contain" not behaving as expected with wrapping on Feb 19, 2020
@alexdima alexdima added bug Issue identified by VS Code Team member as probable bug editor-minimap Code/Text minimap widget issues and removed info-needed Issue requires more information from poster labels Feb 19, 2020
@alexdima alexdima added this to the February 2020 milestone Feb 20, 2020
@mjbvz mjbvz added the verified Verification succeeded label Feb 27, 2020
@alexdima
Copy link
Member

FYI after #91405, the new setting is minimap.size and the values proportional, fit and fill.

@github-actions github-actions bot locked and limited conversation to collaborators Apr 5, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Issue identified by VS Code Team member as probable bug editor-minimap Code/Text minimap widget issues verified Verification succeeded
Projects
None yet
Development

No branches or pull requests

3 participants