rhysd / clever-f.vim

Extended f, F, t and T key mappings for Vim.
https://rhysd.github.io/clever-f.vim
1.01k stars 44 forks source link

Fix `t` and `T` with migemo #32

Closed thinca closed 7 years ago

thinca commented 7 years ago

When g:clever_f_use_migemo is TRUE, the searching pattern would be as follows(with searching W):

\%(...migemo-pattern...)\&\%(W\|\A\)

When using t, the pattern would be as follows:

\_.\ze\%(...migemo-pattern...)\&\%(W\|\A\)

This pattern includes \& . This does not work as intended.

It should be:

\_.\ze\%(\%(...migemo-pattern...)\&\%(W\|\A\)\)

P.S. Sorry, test is missing 🙇

rhysd commented 7 years ago

Thank you for catching this! Patch looks good and I'm now investigating why test is broken.

thinca commented 7 years ago

Oops, I didn't check the result of test in my local environment :dizzy_face:

rhysd commented 7 years ago

no problem. I fetched this branch in my local.

rhysd commented 7 years ago

I confirmed that the test is wrong and your implementation is correct. Thank you!