justinmk / vim-sneak

The missing motion for Vim :athletic_shoe:
http://www.vim.org/scripts/script.php?script_id=4809
MIT License
3.24k stars 88 forks source link

fix repeat for g@ #308

Closed tomtomjhj closed 6 months ago

tomtomjhj commented 6 months ago

When repeating g@ operator, sneak#wrap() uses information stored in s:st.opfunc_st instead of taking additional input.

justinmk commented 6 months ago

Many thanks. What is an example of a case that this improves? I was hoping it might help with vim-surround but no luck :(

tomtomjhj commented 6 months ago

I was having problems with vim-sandwich, which does something similar to surround.

Before this patch, when repeating the sandwich that used sneak as the object, the "extra" input was added to input queue. For example, if I repeat ysf{char1}{char2}, {char1} was executed after the repeat.

It's interesting that surround didn't have issue with this. Might be related to the fact that vim-sandwich doesn't use vim-repeat.

justinmk commented 6 months ago

Might be related to the fact that vim-sandwich doesn't use vim-repeat.

Yep.