VSCodeVim / Vim

:star: Vim for Visual Studio Code
http://aka.ms/vscodevim
MIT License
13.73k stars 1.31k forks source link

fixes #8872 issue with surround #9140

Closed Nestastnikos closed 1 month ago

Nestastnikos commented 1 month ago

What this PR does / why we need it: The current behavior is clearly a bug, see related issue.

Which issue(s) this PR fixes

8872

Special notes for your reviewer: One special case that I found, is that if we do the repro steps from the issue (VStt) and we input a string p (the first character is space). The resulting closing tag will be </>. It might be not be intutiive, but the same behavior occurs also in the original vim-surround implementation, so I intentionally didn't deal with this special case.

J-Fields commented 1 month ago

Tests seem to be failing - mind looking into that @Nestastnikos?