-
Notifications
You must be signed in to change notification settings - Fork 4.9k
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
Escape does not close autocomplete window. #4242
Comments
Old bug, no activity. I just tried reproducing this on develop but I can't. Is this still a problem? |
I'm seeing the same thing, but only with some company backends (??). Worse, it doesn't really appear to fully exit insert mode (keys still get inserted until the popup closes). Specifically, I can reproduce this with |
@Stebalien Can you still reproduce this? I'm unable to reproduce the issue using System Info 💻
(auto-completion better-defaults bibtex c-c++ dash emacs-lisp git github gtags html java javascript latex markdown ocaml org python racket ranger rust shell shell-scripts helm syntax-checking emoji) |
Yes, I still can.
|
Ah, indeed I can now reproduce this. Strange 😕 |
I also have this problem, using Full .spacemacs (permalink)System Info 💻
((auto-completion :variables auto-completion-complete-with-key-sequence "jk")
better-defaults
(c-c++ :variables c-c++-default-mode-for-headers 'c++-mode c-c++-enable-clang-support t c-c++-backend 'rtags)
chrome cmake docker emacs-lisp graphviz git helm html
(javascript :variables javascript-fmt-tool 'prettier javascript-import-tool 'import-js js2-basic-offset 2 js-indent-level 2 js-switch-indent-offset 2 node-add-modules-path t)
(json :variables json-fmt-tool 'prettier)
(markdown :variables markdown-command "pandoc")
multiple-cursors nginx
(org :variables org-enable-github-support t org-enable-bootstrap-support t org-enable-org-journal-support t org-enable-hugo-support t org-enable-trello-support t org-enable-jira-support t)
osx pandoc prettier
(python :variables python-test-runner 'pytest python-formatter 'black python-fill-column 99)
react rust
(shell :variables shell-default-height 30 shell-default-position 'bottom)
shell-scripts spell-checking sql syntax-checking themes-megapack theming treemacs version-control xclipboard yaml)
|
It's working for me. System Info 💻
(autohotkey auto-completion emacs-lisp git helm markdown multiple-cursors org python syntax-checking treemacs version-control)
|
Strange, I can't reproduce it either now. Will report back if it reoccurs. |
Ok, reproduced it now: Keystrokes: Watch the indicator in the modeline change from green to yellow to see when The |
I'm also able to reproduce it now, it seems to only occur when the completion popup shows file/dir paths. At first I thought that it was because the cursor moves backwards by default and the popup might be trying to check for new candidates at the cursors new position. (setq evil-move-cursor-back nil) Then the same issue occurs. The popup remains/reopens. Reproduction steps:This can be seen in
In this state with the completion popup open and the cursor in normal state, I'm able to move left You said that |
I am experiencing this issue using the default |
This comment was marked as duplicate.
This comment was marked as duplicate.
A (potentially very naive) quickfix for evil users could look roughly like (defun my-escape-from-company ()
(interactive)
(company-abort)
(evil-escape))
(with-eval-after-load 'company
(key-chord-define company-active-map "jf" 'my-escape-from-company)) where you would need to replace "jf" with your escape sequence (e.g. "fd"). For me this currently works but this seems to be a somewhat elusive issue which may depend on the individual setup... |
The issue is still present.
That makes my autocompletion not show up at all. :/ |
C-g should close auto-completion menu. |
That's what I do, but then I'm doing I wonder how others deal with this. Do you also use |
I only need to use C-g. |
I assume you use hybrid or vim mode as well. So you treat the closing of the autocompletion and the transition to normal mode as separate operations I guess. However, here you can see that the transition to normal mode doesn't work if you don't close the autocompletion first #4242 (comment). The same thing happens to me. |
+1, this sometimes happens to me too on the most recent develop (4688cd7). When I hit escape the popup sometimes closes correctly, and sometimes flickers and then reappears and stays on the screen in normal mode. |
This workaround has been working for me, and I haven't noticed any unintended side effects:
|
Unfortunately @e-matteson's workaround isn't working for me, because it seems to call As a workaround I came up with the following solution: (with-eval-after-load 'evil-escape
(defun company-abort-on-evil-escape ()
(require 'company)
(company-abort))
(advice-add 'evil-escape-func :after #'company-abort-on-evil-escape))
|
Why?: - Pressing Escape or calling evil-escape using "fd" or your configured keybinding does not close Company's auto-complete pop-up especially using LSP. See also: syl20bnr#4242 This change addresses the need by: - Add hook to call company-abort when entering evil-normal-state
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Please let us know if this issue is still valid! |
We are using our own fork of evil escape on latest develop if an escape is missing there I can easily add it. @niontrix is this still required? |
I have just checked and this should be fixed already on develop when you upgrade your packages. |
Hi, I'm brand new to Emacs so thank you for your patience. I'm only even trying Emacs thanks to Spacemacs. The issue I'm seeing is that when hitting escape, Evil goes into normal mode as expected, but any autocomplete window that is open does not close.
This is my entire config:
These are my enabled layers:
I'm on Mac OS Yosemite.
The text was updated successfully, but these errors were encountered: