IntelliSense
IntelliSense copied to clipboard
Inaccurate mouse click tracking inside in-cell formulas
When mouse clicking into the in-cell formula we somehow fall one mouse click behind, with the formula prefix and display matching one mouse click earlier. The formula bar edit box does not have this problem.
Maybe it's somehow related to the problem the author of DotNetRefEdit (https://github.com/Ron-Ldn/DotNetRefEdit) tried to solve? "Actually, the first click will activate the window and then Excel will discard the message." I don't mean it's the exactly the same issue, but maybe in this case Excel eats one of the window messages too?
Excel seems to process the mouse message correctly, but the API call I use to get the formula state and caret location returns the wrong information in this case. For the formula edit box the information is correct after a mouse click, so it looks like a small Excel bug. I can imagine some workarounds - e.g. detecting the mouse and sending quick right-left keyboard movement or something like this. I'm leaving it for another day, though.
I've extended the edit state update delay in version 1.0.9, which might help this a bit.