Skip to content
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

Feature request: A way to save without closing autocomplete popups #2283

Open
scholer opened this issue May 1, 2018 · 1 comment
Open

Feature request: A way to save without closing autocomplete popups #2283

scholer opened this issue May 1, 2018 · 1 comment

Comments

@scholer
Copy link

scholer commented May 1, 2018

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.

@keith-hall
Copy link
Collaborator

downstream issue: jamesfzhang/auto-save#21

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants