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

evil-repeat-type' returns nil making evil-repeat-record-fail' #11

Closed
TheBB opened this issue Aug 22, 2011 · 4 comments
Closed

evil-repeat-type' returns nil making evil-repeat-record-fail' #11

TheBB opened this issue Aug 22, 2011 · 4 comments

Comments

@TheBB
Copy link
Member

TheBB commented Aug 22, 2011

Originally reported by: Michael Markert (Bitbucket: cofi, GitHub: cofi)


I could reproduce reliably with an input-method. Sadly.

A simple check on repeat-type before funcalling it helps but maybe it's just triaging the symptom.


@TheBB
Copy link
Member Author

TheBB commented Aug 22, 2011

Original comment by Frank Fischer (Bitbucket: lyro, GitHub: lyro):


I'm sorry but I find this bug report really confusing and difficult to understand. I hope I fixed the bug in 8fac166. If not, please give an example of what is going wrong. Of course, you are encouraged to give hints where the bug may be, but without an example it is very hard to figure out what fails at all.

@TheBB
Copy link
Member Author

TheBB commented Aug 22, 2011

Original comment by Michael Markert (Bitbucket: cofi, GitHub: cofi):


What I meant wrt to input method: Typing any char triggered an error. Should've made this clear :(

The change seems to fix it, I don't run into the issue anymore.

For completeness sake: I changed `evil-repeat-record-command' this way:

 (defun evil-repeat-record-command (&optional repeat-type)
   "Calls the post-repeat-information of the current command."
   ;; finish repeation of current command
   (let ((repeat-type (or repeat-type
                          (evil-repeat-type this-command t))))
-    (funcall repeat-type 'post)))
+    (if repeat-type
+      (funcall repeat-type 'post))))

But since evil-repeat-type' can return nil and repeat-type' is optional you should consider adding such a check.

@TheBB
Copy link
Member Author

TheBB commented Aug 22, 2011

Original comment by Frank Fischer (Bitbucket: lyro, GitHub: lyro):


Thanks. The function `evil-repeat-record-command' should never be called with a non-function repeat-type ... so my fix is to remove this function completely (it was legacy anyway) ;)

But I realized that repeation with input-methods did not work (anymore?). It should work in b464897 again.

@TheBB
Copy link
Member Author

TheBB commented Aug 22, 2011

Original comment by Michael Markert (Bitbucket: cofi, GitHub: cofi):


@input-methods\
Didn't notice. But it broke: Typing ue with german-postfix got me üü (double result). But b464897 seems to fix it.

@legacy\
Well then: Great that it broke :)

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

1 participant