You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Currently, invoking view.run_command("save") has the same effect as pressing Ctrl+s, and will close any open autocomplete menus. For plugins that invoke the save command periodically/automatically this may interfere with the user experience. You don't want your autocomplete menus to disappear while trying to select the right completion. (Case in point: the auto-save plugin.) While the plugins could use the API to determine if an autocomplete menu is visible (is_auto_complete_visible), this is not optimal, and could interfere with the plugin's expected use. In some cases, the autocomplete menu may be visible the majority of the time. Or the user could just leave the computer mid-word with the autocomplete menu open, preventing auto-save from ever saving the document.
The optimal way to solve this would be to accept a parameter to the save command, e.g. view.run_command("save", {'hide_menus': False}). Providing no args defaults to the existing behaviour. But passing hide_menus=False would save the view without closing autocomplete menus. Basically just writing the view to its file with no side effects.
The text was updated successfully, but these errors were encountered:
Currently, invoking view.run_command("save") has the same effect as pressing Ctrl+s, and will close any open autocomplete menus. For plugins that invoke the save command periodically/automatically this may interfere with the user experience. You don't want your autocomplete menus to disappear while trying to select the right completion. (Case in point: the auto-save plugin.) While the plugins could use the API to determine if an autocomplete menu is visible (is_auto_complete_visible), this is not optimal, and could interfere with the plugin's expected use. In some cases, the autocomplete menu may be visible the majority of the time. Or the user could just leave the computer mid-word with the autocomplete menu open, preventing auto-save from ever saving the document.
The optimal way to solve this would be to accept a parameter to the save command, e.g. view.run_command("save", {'hide_menus': False}). Providing no args defaults to the existing behaviour. But passing hide_menus=False would save the view without closing autocomplete menus. Basically just writing the view to its file with no side effects.
The text was updated successfully, but these errors were encountered: