1. Frank Fischer
  2. evil
  3. Issues
Issue #11 resolved

`evil-repeat-type' returns nil making `evil-repeat-record-fail'

Michael Markert
created an issue

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.

Comments (5)

  1. Frank Fischer repo owner
    • changed status to open

    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.

  2. Michael Markert reporter

    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.

  3. Frank Fischer repo owner

    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.

  4. Log in to comment