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

Inconsistent behaviour between the completion and the evil-repeat command. #483

Open
CabalCrow opened this issue Dec 23, 2022 · 2 comments
Labels
help wanted Extra attention is needed

Comments

@CabalCrow
Copy link

After I've used the acm-complete command in insert mode, it doen not always insert the same text when I try to insert it again via the evil-repeat command. This behaviour seems to happen more often if I've scrolled through the completion candidates via acm-select-next. It is also context aware so if I apend/change some text in position A with the acm-complete, and then I try to use the evil-repeat command in position B I will have a different result.

I suspect this is because evil-repeat is repeating the acm-complete command again, rather than just inputting the text that was selected the last time via the acm-complete command. This also slows down the evil-repeat command when used many times in a row as the acm calls a popup buffer everytime.

The behaviour I expected was for evil-repeat to always input the same text when acm-complete was used.

Here some examples:
In elisp mode:

some-
same-

I have this text, if I apend "some-" with "buffer" by using acm-complete, and then I try to apend the "same-" with "buffer" by using evil-repeat afterwards, I instead get "some-buffer" on both lines. This is the most consistent way to reproduce this behaviour. There are other ways to achive this behaviour - but they tend to be inconsisten. They happen often, but are hard to reproduce consistently.

@manateelazycat
Copy link
Owner

I don't use evil, can't help you

@manateelazycat manateelazycat added the help wanted Extra attention is needed label Dec 23, 2022
@all9n
Copy link

all9n commented Dec 24, 2022

Looking at evil-integration.el, I think this should do?

(mapc #'evil-declare-change-repeat
      '(acm-complete
        acm-insert-common))
(mapc #'evil-declare-ignore-repeat
      '(acm-doc-scroll-down
        acm-doc-scroll-up
        acm-doc-toggle
        acm-filter
        acm-hide
        acm-select-first
        acm-select-last
        acm-select-next
        acm-select-prev))

I still get "lingering" completion popup after exiting insert-mode, though very rarely. Not sure if this is due to evil-mode or just childframes being a bit flaky on macos in general. More testing needed ...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

3 participants