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

Can't dot repeat when surrounding with counted movements #133

Closed
jvmcarneiro opened this issue Dec 14, 2017 · 6 comments
Closed

Can't dot repeat when surrounding with counted movements #133

jvmcarneiro opened this issue Dec 14, 2017 · 6 comments

Comments

@jvmcarneiro
Copy link

When I surround with a count like ys2w" and try to repeat it with ., it does so as if I didn't input any count (ysw").

For example:
Using ys2w" on a text fragment like -word yields "-word";
Dot repeating it on another fragment -another yields "-"another.

Am I missing something? Is this expected behaviour?

@ninrod
Copy link
Member

ninrod commented Dec 14, 2017

I suspect this: emacs-evil/evil#9. Summoning @justbur who just did touch some lines regarding the repeatition support.

@justbur
Copy link
Member

justbur commented Dec 14, 2017

I didn't change anything that would affect ysiw". This is a different problem. My changes only affected surrounding with functions or tags.

By the way, in general the way evil-surround implements repeat (especially for ys) is pretty brittle and probably should be rewritten.

@ninrod
Copy link
Member

ninrod commented Dec 14, 2017

@justbur, maybe related to emacs-evil/evil#9?

yeah. I wish I had the lisp and evil knowledge to do it.

@dsdshcym
Copy link
Contributor

This patch makes repeat work with counted motion:
evil-this-motion-count.diff.txt

But I'm not sure if it's the right way to fix this issue.

@ninrod
Copy link
Member

ninrod commented May 25, 2020

thank you @dsdshcym.

Do you want to fill out a PR? You could include a test to verify that the behaviour is correctly implemented.

I'll try your patch locally, anyway. Thanks again.

dsdshcym added a commit to dsdshcym/evil-surround that referenced this issue May 25, 2020
ninrod pushed a commit that referenced this issue Jun 3, 2020
@ninrod
Copy link
Member

ninrod commented Jun 3, 2020

346d4d8 by @dsdshcym closes this.

@ninrod ninrod closed this as completed Jun 3, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants