Issue #312 resolved

d{t,f} and c{t,f} commands not working

Anonymous created an issue

Hi!

I'm having an issue with the dt/df and ct/cf commands. I'm running Emacs 24.3 and Evil 1.0.5.

In a text buffer, entering dt<char> or df<char> throws a Wrong type argument: integer-or-marker-p, nil error which is thrown upon entering t. Furthermore, entering ct<char> or cf<char> puts me in insert state immediately after hitting the t or f. The same thing happens with (capital) F and T.

Finally, I'm having trouble with the plain ; command. For example, consider the following line (| is cursor):

|foo bar baz

pressing 'tb' results in:

foo| bar baz

pressing ';' keeps the cursor in the same spot:

foo| bar baz

whereas in Vim, ';' will place the cursor in the following spot:

foo bar| baz.

Thanks!

Comments (11)

  1. daf

    Hi Frank,

    You've solved my first issue - dt<char> and ct<char> seem to work now.

    However, I'm still encountering the second "bug" - pressing ; after a t command does not move the cursor as it does in Vim.

    I love and use Evil mode every day. Thanks for the great work!

  2. Frank Fischer repo owner

    Well, I assume that this behaviour changed recently, because the original vim behaviour was not to move the cursor (and, in fact, on my machine vim still has this old behaviour). I assume it should not be too difficult to adapt, though.

  3. Frank Fischer repo owner

    I've just returned from my summer vacations and there's a lot of work accumulated over the last few weeks. I'll look into your patch, but it will take some time, so please be patient.

  4. Frank Fischer repo owner

    Make ; and , skip adjacent characters when repeating t or T (fix #312).

    The old behaviour of ; and , after t or T was to repeat that command literally which caused point not to move. The latest Vim version now support a configuration option cpo-; that causes the repeat command to skip an adjacent character. This change enables this behaviour in Evil given that evil-repeat-char-to-skip-next is set to non-nil (which is the default).

    → <<cset 7e3ea126e470>>

  5. Frank Fischer repo owner

    Make ; and , skip adjacent characters when repeating t or T (fix #312).

    The old behaviour of ; and , after t or T was to repeat that command literally which caused point not to move. The latest Vim version now support a configuration option cpo-; that causes the repeat command to skip an adjacent character. This change enables this behaviour in Evil given that evil-repeat-char-to-skip-next is set to non-nil (which is the default).

    → <<cset 7e3ea126e470>>

  6. Log in to comment