Closed rigdern closed 1 day ago
I think that self
plays this role for the cases that I care about. When you begin executing some code (e.g. by hitting a keyboard shortcut you've registered), self
refers to the box where execution began which is probably also where your cursor is.
cursor-box
would return the box that the cursor is within (similar to howmouse-box
returns the box that the mouse is over).Without such an API, I'm not sure how to implement features similar to the builtin help feature that annotates the procedure name under the cursor with the procedure's input names. Here's an example of that builtin help feature. If I type the procedure name
item
:and then hit ctrl+?, then the procedure name gets annotated with the names of its parameters:
N
andBOX
:I don't think that could be implemented without knowing which box the cursor is in.