emacs-vs / auto-rename-tag

Automatically rename paired HTML/XML tag.
GNU General Public License v3.0
38 stars 10 forks source link

Rename only happens in post-command and recursion is prevented #11

Open aaronjensen opened 4 years ago

aaronjensen commented 4 years ago

Fixes #9

This may fix the issues you were seeing, it was possible for infinite recursion to happen which cause a stack error. This should prevent that.

jcs090218 commented 4 years ago

The major issue is when I try to delete the whole word, it wouldn't delete the tag (whole word). Would it delete the whole word on your side? Thanks!

aaronjensen commented 4 years ago

It does for me, yes. Can you provide an example that does not currently work for you with this branch?

aaronjensen commented 4 years ago

@jcs090218 give this a shot. It's quite possibly a very bad idea.

The other thing to try is to stash the changes we want to make somewhere during after-change and then apply them during the next post-command, which was the suggestion here: https://github.com/emacs-lsp/lsp-mode/issues/1704#issuecomment-630904219