-
-
Notifications
You must be signed in to change notification settings - Fork 257
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
Pasting text doesn't work properly in evil-mode #756
Comments
Hi, i do not use evil and would prefer you see this directly with them. I can provide help if needed |
I wasn't quite able to reproduce the problem without evil-mode. Multiple ways could lead to the output, that is generated by the listed evil commands. It might as well be a problem in evil. Do you have suggestions on how to further debug this? |
@tbo sorry but I am not able to help you on this. Perhaps try on emacs stackoverflow |
I can confirm this issue and it's very annoying. |
I tried to find some help on Stackoverflow and the Evil issue tracker, but haven't got a single answer within the past 6 months: http://emacs.stackexchange.com/questions/24542/pasting-text-doesnt-work-properly-in-evil-web-mode It seems that spacemacs users are affected by this problem as well: I tried to debug this even further and found something curious while testing different combinations of web-/evil-/js2-mode. These are the outputs of evil-mode + web-mode:
evil-mode only:
web-mode only:
evil-mode + js2-mode:
Vanilla emacs:
As you can see only the combination of web-mode and evil-mode looks totally out of place. The fact that it works with js2-mode might suggest that it is a problem in web-mode. I tried to look into to the web-mode sources, but was a bit overwhelmed. |
@fxbois Are you watching closed issues? |
@tbo I can provide help on this but not more. I am not an evil-mode user |
@fxbois I'm fine with that. I will continue my debugging efforts, but I'm unfamiliar with the internals of web-mode. I would appreciate some hints on where to start. Maybe even some references to emacs to concepts I should get familiar with. |
As far as I can tell, this is caused by a combination of a) evil leaving the (yank-handler (evil-yank-line-handler) property after a line yank |
@bschwehn do you suggest any change in the web-mode code/behaviour ? |
@fxbois: I don't understand this issue well enough to suggest any change. Actually, after trying again, I am not sure anymore that the yank-excluded-properties related code in web-mode really makes a difference. For now, this looks more like an issue in evil to me |
For the record, this has been resolved in Evil recently: emacs-evil/evil#937 |
Thank you very much for the update |
In certain situations emacs doesn't properly paste text. Apparently this only happens if the current buffer isn't saved and both web-mode and evil-mode are loaded. I was able to reproduce this behavior with the following config:
Reproduction:
Edit the following file:
Then press the following series of keys:
yGPwywp
(Copy the function in front of the cursor, go to the function name, copy it behind the cursor)Result:
Apparently the text has been truncated and is being pasted in the next line.
If I remove web-mode (the last two lines) from my config, then everything works as expected:
Here is the output of
web-mode-debug
:The text was updated successfully, but these errors were encountered: