-
Notifications
You must be signed in to change notification settings - Fork 21
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
Trigger happy autocomplete #72
Comments
+1 for this |
I had a similar issue and it was because I had also installed latex-friend which has a similar feature. It seems that there is a conflict between the two. I uninstalled latex-friend and everything works perfectly now. |
The trigger-happy behavior is in part due to some internal atom limitations, though it can be ameliorated. As for focus not returning to the editor, I am seeing this too. @ig0774 any ideas? It's not consistent, which makes this harder to debug. |
On the focus issue, I think this should've been resolved by #78, but if you're seeing it with those changes, I can try to dig a bit more. |
Actually, no. I've pulled #78 into master and have been using it for the past few days (yay dogfooding!). It is very weird. What I can see is this: (1) if you disable auto-triggering, then there is never a problem with the keybinding (C-l,x). |
One possibility I can think of is that we may not actually be storing a reference to the TextEditor, since its actually storing @previouslyFocusedElement = atom.views.getView(atom.workspace.getActiveTextEditor()) That should ensure we try to reset focus on the text editor. If that works, we could pass the triggering text editor via |
@ig0774 Why not just to use the autocomplete+ for this? |
@ig0774 yes, that seems to work! It's a bit weird, because the problem happens in 0.8.0 as well (per @tomrijndorp), where we still use space-pen-views... anyway, that seems to fix the problem, so that's great. Would you be able to whip up a PR for this? @ivlis autocomplete+ is not smart enough for our purposes. More precisely: it may be OK for references, but with bibliographies, I think showing more info is better---but that requires a panel, rather than a pop-up. |
Well, #78 was an attempt to be a really careful port of the space-pen stuff. I didn't want to introduce new behaviour (after the pain of the last ST release). I think the space-pen stuff had that behaviour because they couldn't always rely on there being an active text editor (e.g. with the command palette). |
It seems that autocomplete is a bit too trigger happy. The issue with this, besides being annoying, is that the undo history stack is not reachable anymore. The reason for this is that after editing a
\cite
command, undo will move the cursor back into the brackets, triggering the autocomplete pane.Additionally, on my system (OS X El Capitan, Atom 1.7.0-beta0, LaTeXTools 0.8.0), autocomplete does not return keyboard focus to the editor window, which is mildly annoying.
Screen recording:
The text was updated successfully, but these errors were encountered: