I’m writing a plugin to navigate a large log file. There are commands to navigate to some specific structure in the log, and depending on whether my plugin has that location cached already, it might take a long time (say, a minute or more) to find it.
Searching in the main thread essentially hangs sublime for the minute or so, which isn’t exactly a great user experience, so I do the search in a background thread and then schedule a task on the main thread to navigate to the specified structure when it’s found. All of this works, so no problem there.
What I would really like is a non-modal dialog with a cancel button. That would give the user some feedback about what’s happening and give them a chance to cancel. I’m currently using a popup, but that’s non-ideal because it goes away if the cursor moves. The dialog methods in sublime look like they’re modal (they return the selection, rather than have a callback), which would defeat the purpose of the background thread.
Is there a UI element I’m missing?