Excel-DNA/IntelliSense

"Cannot call this method on an empty rect" when holding backspace to delete formula characters on a slower machine

Opened this issue · 1 comments

Reproduces reliably in PopupListWatcher for me when I am using a slower virtual machine and quickly delete formula symbols up until the opening bracket disappears (=FUNCTION("blah-blah" =>>> =FUNCTION)

image

It seems harmless otherwise, does not crash the app (probably due to a try/catch up the stack), but I wonder if it should be handled more gracefully.

I can't reproduce it myself, but I do find weird things happening from time to time, especially when debugging. So I'm happy to find one you can pin down - thank you!

I guess for this case we can just add a check to the condition:

                if (string.IsNullOrEmpty(text) || itemBounds == Rect.Empty)