c) Use SetCursorPos or similar to move the mouse to the correct minimap position
So is it possible for this behaviour to be modified/overridden somehow?
alexrussell wrote:The issue you specifically are having on happens on files whose minimap-height is greater than that of the available minimap area, so it's not all files, but yes, a good number. (For me, if a file goes over about 500 lines.)
alexrussell wrote:But on to your suggestion of making it behave sensibly, the problem is that there's no 'sensible' that works for everyone. For some people, your method whereby a single click works as expected will actually behaving erratically because they're click-draggers. As soon as you start dragging (using your 'sensible' option) the mouse will be in the wrong place thus the editor will jump around. The only solution to that is to use the SetCursorPos Win32 API as MikeC suggested, but as he said it's going to have to be built into the ST2 core. Also it may not be cross-platform compatible: I know Win32 has the function, but maybe other OSes don't allow applications to change the cursor position programmatically. While it seems crazy for an OS not to allow applications to do this, you can see how they may wish to lock this down - it creates a bad user experience if the cursor is not where you last left it! And anyway, even if this was possible, some may still call it broken (or not 'sensible') due to this exact user experience breaking: "I click the minimap and it moves my mouse around. What's that all about?"
alexrussell wrote:But having said that, as MikeC said you have a lot of people with you thinking the exact same thing. The bigger issue is how to fix it without making the situation worse or just as bad.
adr wrote:I still don't understand why we're talking about SetCursorPos... I entirely agree that the application controlling the mouse pointer is a horrible idea, but why do both you and Mike think is it necessary to raise this point? Unless I'm missing something really obvious there's no reason why the existing click-drag wouldn't continue to work exactly as it does now (which I have no issues with at all, it's perfect!). OK, if you do a single-click and it jumps directly to that point in the file, the mouse pointer may not be over that location in the mini-map... but so what?? You'll be able to see the area of the file itself in the main part of the window *and* the mini-map highlight will reflect the new location. If you want to perform a subsequent single-click then the effort required to look at the updated mini-map and reposition the mouse is trivial! Certainly far less annoying than not getting the location in the file you wanted in the first place!
Users browsing this forum: Google [Bot], Majestic-12 [Bot], Yahoo [Bot] and 16 guests