-
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
Pasting content in webmode inserts content in incorrect place #3960
Comments
I can confirm this. |
What are the steps you are using for delete and paste? I tried it here by using |
<div></div>
<div |id="foo"></div> Cursor is at <div></div>
id="foo
<div> |
I definitely can't confirm any of your behaviour. It works as expected here. |
I did some additional testing, the error only occurs for me when I have the |
Same as @TheBB, I can't reproduce, with html layer enabled too. Can you paste here the result of |
System Info
(html) I should also note that it seems the behavior doesn't occur with a fresh buffer (e.g. just paste the above in). In order to trigger, it seems that you need to work within the buffer for a bit. The most reliable way I've found is to paste in the above, then swap the lines twice by typing |
Ok I was able to reproduce it, by playing indeed a few time with the buffer. Looks like an upstream bug for me, probably between |
I am not a spacemacs user, but I am experiencing the same issue. I was able to confirm @StreakyCobra's web-mode<->evil theory. I already filed a bug in the web-mode bugtracker (fxbois/web-mode#756), but the maintainer couldn't help me out and pointed me to stackoverflow, where I posted the problem as well (http://emacs.stackexchange.com/questions/24542/pasting-text-doesnt-work-properly-in-evil-web-mode). After one month without any comments, I reposted it in the evil bugtracker (https://bitbucket.org/lyro/evil/issues/703/pasting-text-doesnt-work-properly-in). To this day, i haven't got any answers. Any ideas, what I could try next? |
Well, there's always reading the source code and figuring it out yourself, if all else fails. |
Confirm this.I can reproduce this bug,the code:
when I use evil-visual-state to copy
but when I use
then use evil-visual-state to copy
I read the evil code and test it,and I found the bug was caused by
Unfortunately,I don't konw how to fix it?:joy: |
As a workaround I changed evil-common function evil-yank-characters to
This seems to work so far, but not sure about any possible side-effects. |
Edit: wrong information, cannot delete comment. |
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! |
Cursor is at
|
, deletingid=foo
and attempting to paste into the first div will result inrather than the expected
The text was updated successfully, but these errors were encountered: