kylechui / nvim-surround

Add/change/delete surrounding delimiter pairs with ease. Written with :heart: in Lua.
MIT License
2.92k stars 60 forks source link

fix: allow yss motion to work with dot-repeat #261

Closed ribru17 closed 9 months ago

ribru17 commented 9 months ago

Allows lines surrounded with yss to be dot-repeatable. Currently dot repeating will only surround to the end of the line, since the ^ motion is processed before the <Plug> call. This PR also keeps the current count functionality.

Current behavior (when last action was e.g. yssB): hi |there -> . -> hi BthereB

With this PR: hi |there -> . -> Bhi thereB

Cursor move is also respected.

ribru17 commented 9 months ago

Not sure why this other test is failing, it should be unaffected. I'll look into it more