tpope / vim-repeat

repeat.vim: enable repeating supported plugin maps with "."
http://www.vim.org/scripts/script.php?script_id=2136
2.61k stars 83 forks source link

breaks macros containing dot-repeat #23

Closed justinmk closed 9 years ago

justinmk commented 10 years ago

On Windows gvim with repeat.vim, replaying a macro that contains a dot-repeat invocation will insert the @. register instead of repeating.

confirmed on:

Minimal steps to reproduce:

a b c
a b c
fooc
fofooob c

Which is wrong. The expected result is:

fooc
fooc

This could be a bug in feedkeys()...

tpope commented 10 years ago

Is this confirmed to be Windows only?

Possibly relevant: d8f7fe7. One solution could be to use norm on Vim 7.4.

justinmk commented 10 years ago

Also reproduced on a a Bodhi Linux box with Vim 7.2.330 (and confirmed that the issue does not occur if repeat.vim is not sourced).

Thanks for linking that commit, it will be helpful for reporting to vim_dev.

justinmk commented 10 years ago

Also occurs on MacVim. Sorry for the confusion. When I tested on MacVim before, I hadn't yet narrowed down the minimum steps.

justinmk commented 10 years ago

Reported to vim_dev: https://code.google.com/p/vim/issues/detail?id=212

:nnoremap . :call feedkeys(".", "n")<cr> is enough to reproduce the issue.

justinmk commented 9 years ago

vim_dev has given some attention to this issue, and it appears that there is no general solution for feedkeys(). So here's a PR that uses :norm for Vim >= 7.3.100: https://github.com/tpope/vim-repeat/pull/36

wellle commented 9 years ago

Actually feedkeys just got a new flag i that could now be used: Patch 7.4.601

justinmk commented 9 years ago

@wellle send a PR!

wellle commented 9 years ago

@justinmk: #39