Sublime Forum

Minimap Click Navigation Bug

#1

Just noticed that the new minimap click navigation doesn’t hit the right spot when the file length exceeds the minimap height. Also, I wonder if it would be better for the window to centre around the click instead of at the top. I think this was suggested elsewhere.

0 Likes

#2

There is no way around this, unfortunatly; it’s the exact reason why click-to-scroll was disabled. The alternative, scrolling to the text the user clicks on, would result the the orange rectangle not being where the user clicked, which feels even more wrong.

I agree it feels somewhat odd to have the top of the rectangle go to where you click, but, again, I suspect the alternatives are even more surprising. Placing the centre of the orange rectangle where the user clicks wouldn’t allow scrolling all the way to the bottom of the file, for instance.

0 Likes

#3

I’m not so sure. When I click on a block of text in the minimap it is because I want to see that text. That is not the result in the current implementation. In fact, in large files, the position is not even close to the text that was clicked. Would it be possible to try it the other way in a beta and see what the reaction is?

Understood.

0 Likes

#4

But, what about this setting?

"scroll_past_end": true

Wouldn’t that circumvent the restriction of not being able to scroll to the bottom of the file? E.g. if there was a setting called “center_minimap_rectangle_around_click”, that setting would incorporate the effects of “scroll_past_end” (in other words, overrule that setting).

Having the rectangle center around click would be really nice. To me, that’s half the purpose of having a visual mini map. (I’m saying this with humble respect for the fact that programming is hard! and things are more difficult to implement than common end-users would ever grok.)

0 Likes