kylechui / nvim-surround

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

Adds delimiters in the wrong place when using `ip` text object #16

Closed andrewferrier closed 2 years ago

andrewferrier commented 2 years ago

Recreation:

aaa
bbb
ccc

ddd
eee
fff

ggg
hhh
iii

Observed:

Expected:

aaa
bbb
ccc

"ddd
eee
fff"

ggg
hhh
iii

In essence, I think you are missing out the last line of the paragraph. This is also how vim-sandwich operates, and I suspect vim-surround (although I haven't installed the latter to check it).

kylechui commented 2 years ago

TIL that vip actually selects the paragraph using visual line mode, not char mode; I suspect that the marks are set on the first character of both lines instead of the "proper" characters; I'll start work on this after I finish some of the work on the other issues

kylechui commented 2 years ago

@andrewferrier Please try updating to the latest commit on main, see if that fixes things here

andrewferrier commented 2 years ago

Yes, this seems to work now, thanks!