Improve logic for obtaining surrounds range in Vim mode (#10938)

now correctly retrieves range in cases where escape characters are
present. Fixed #10827


Release Notes:

- vim: Fix logic for finding surrounding quotes to ignore escaped
characters (#10827)
This commit is contained in:
Hans 2024-04-25 11:19:15 +08:00 committed by GitHub
parent d1425603f6
commit 1a27016123
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
3 changed files with 77 additions and 18 deletions

View file

@ -0,0 +1,10 @@
{"Put":{"state":"h\"e\\\"lˇlo \\\"world\"!"}}
{"Key":"v"}
{"Key":"i"}
{"Key":"\""}
{"Get":{"state":"h\"«e\\\"llo \\\"worldˇ»\"!","mode":"Visual"}}
{"Put":{"state":"hello \"teˇst \\\"inside\\\" world\""}}
{"Key":"v"}
{"Key":"i"}
{"Key":"\""}
{"Get":{"state":"hello \"«test \\\"inside\\\" worldˇ»\"","mode":"Visual"}}