You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
editor.revealRange should ensure first line of range is always visible #45742
Currently if you call editor.revealRange with a range that doesn't fit on the screen, it still centers the middle line. This means if it's a class/method/whatever you get a random chunk from the middle.
It should be possible (default, IMO, but at least an option) to always ensure the first line is in view, since it's almost always likely that the earlier lines in the range are more important to see than the middle lines (since the start of the range is likely the start of a declaration of something).
Verified by seeing that when I focus an item in the breadcrumbs that doesn't fit in the viewport, it shows me the top instead of the middle of that range. I assume that is verifying the right code here. That's a huge improvement, thanks!
Activity
DanTup commentedon Mar 26, 2018
As a workaround, I figured I can call reveal again with the start of the range and using the Default reveal type:
roblourens commentedon Oct 29, 2019
Verified by seeing that when I focus an item in the breadcrumbs that doesn't fit in the viewport, it shows me the top instead of the middle of that range. I assume that is verifying the right code here. That's a huge improvement, thanks!
DanTup commentedon Nov 25, 2019
Fix LGTM too, thanks!