-
Notifications
You must be signed in to change notification settings - Fork 40
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Minihtml popup flickers when updating. #3107
Comments
/cc @sergeche |
More flickering caused by |
@jskinner added a fix for that in Sublime Merge during the last dev cycle. Hope it would find its way over to Sublime Text. |
For now, you should probably resort to holding back changes with a timeout and only update every x ms. |
This can be worked around right now using If you are creating a phantom to replace an existing one you should do it in the main sublime thread (if you generate your html on a background thread use |
Reference links for plugin authors using |
That's the root cause of raising this issue. |
It seems like the problem is that popup automatically hides on each update (at least in my case) so I can’t just update its contents. Maybe because I use |
FWIW the next build of S4 will have an additional flag, |
Just retried my debug snippet with the new flag on ST4057. Unfortunatelly it seems to have no effect on Windows. This is my updated debug code: import sublime
import sublime_plugin
class PopupListener(sublime_plugin.EventListener):
def on_selection_modified(self, view):
try:
view.show_popup(
"Hello World",
flags=sublime.KEEP_ON_SELECTION_MODIFIED,
location=view.sel()[0].begin()
)
except IndexError:
pass |
That's right, it won't reduce flickering if you're calling True flicker free updating of the popup under all circumstance will require using 'virtual' popups, which would be constrained to the window area, as I haven't found a way to change both a window position and content in a synchronous manner under X11. I'm planning on experimenting with this approach. |
Thanks for the info and looking into it. I guess it is the same for auto-completion popups then? |
blinking. Minihtml popup flickers when updating sublimehq/sublime_text#3107
Build 4075 moves all popups from child windows to child controls of the main window. I believe this should improve this issue. Do you see any improvement @deathaxe? |
It's moving smoothly. |
Description
Calling
view.show_panel()
sequencially in order to update the content, size or positon of a popup causes it to shortly disapear. It feels noisy especially in situations the popup is tight to key strokes or changing selections.The recently announced Emmet 2 plugin is a very prominent example for that issue as it displays a preview popup right below the typed text.
Quickly typing an appreviation causes the popup to heavily flicker.
Related with #3099
Steps to reproduce
Expected behavior
Move and/or resize the minihtml popup window seemlessly.
Actual behavior
The popup window disapears for some millisecons each time it is to be updated or moved via
view.show_popup()
API function.Environment
The text was updated successfully, but these errors were encountered: