[TxMt] Re: location of pop-up not under cursor

Allan Odgaard mailinglist at textmate.org
Wed Jul 8 12:42:50 UTC 2015

On 6 Jul 2015, at 17:23, Matt Neuburg wrote:

>> On Jul 5, 2015, at 11:39 PM, Allan Odgaard <mailinglist at textmate.org> 
>> wrote:
>> Correct, it prefers the insertion point, as that’s where the action 
>> is
> What "action"?
> Press Shift-Control-Option-H to turn this document into HTML. On my 
> machine, there's a
> tooltip with additional options; I need to press 1, 2, or 3. I need to 
> _see_ that tooltip in order to _make_ that choice.

This is the disambiguation pop-up menu which appear when multiple bundle 
items are bound to the same key or tab trigger.

In your case, the items in the bundle are for the entire document, but 
there are many items where this is not the case, for example if you 
press ⌃⇧X you’re asked to convert to/from hex, which refers to the 
text under the caret, or ⌃⇧C for calculations, or (in HTML) press 
⌘& to see entity conversion items (which again refers to the text).

It makes even more sense for tab triggers, for example if you type 
border⇥ in a CSS file, the same disambiguation menu appears and 
contains completions for what was just typed.

So while it might not be related to your caret position for the HTML 
conversion item, many items are related to the text at the caret.

And none of them are related to the mouse cursor position. That would 
only be appropriate if the action that triggered the menu, was caused by 
a mouse operation, but that’s not possible.

> I think perhaps the solution is that the tooltip just needs to die. 
> Instead, a GREAT BIG window should pop up in the CENTER of the screen 
> where I can't miss it.

I see your point for _some_ items, but certainly not as a general 

This is why I wanted examples, to figure out if a heuristic could be 
devised. Initially I thought you were referring to tool tips, for 
example if you press ⌃⇧N you get document statistics shown in a tool 
tip (at the caret) — had you invoked this same action via the mouse, I 
could see an argument for showing the tool tip at the mouse cursor, but 
that is not the case here.

I will need to think some more about this, but I am not too optimistic 
about finding an elegant solution, because as said, this same menu is 
often used for items that are clearly related to caret position, so we 
can’t make a general change, and I don’t think it makes sense as a 
preference either, rather, it might make sense as a preference for a 
subset of items, but then how to identify those items…

More information about the textmate mailing list