You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When multiple cursors are active around a string with nested quotes and you change the quote characters, the auto-close matching pair feature results in corrupted code.
Reproduction Steps
const a = 'hello "there"'
Select opening single quote /'return
Extend selection v
Select next single quote n
Change the quotes c
Enter backtick `
What should happen
The two single quotes should be replaced by backticks:
const a = `hello "there"`
What actually happens
The two quotes are replaced by backticks and an additional backtick is added to the end:
aral
changed the title
Auto close corruption with nested quotes (edge case)
Auto close matching pair feature causes corruption with nested quotes (edge case)
May 4, 2022
Sorry to be this person, but... this doesn't seem like a bug to me? You have a case where there are two independent cursors in insert mode, so each are going to insert their own auto pairs. Neither are aware of the other. The first cursor does not auto pair in this case because it happens to precede an alpha character.
I think what you want here is mc'` or even just r`
Summary
When multiple cursors are active around a string with nested quotes and you change the quote characters, the auto-close matching pair feature results in corrupted code.
Reproduction Steps
What should happen
The two single quotes should be replaced by backticks:
What actually happens
The two quotes are replaced by backticks and an additional backtick is added to the end:
Helix log
n/a
Platform
Linux
Terminal Emulator
GNOME Terminal
Helix Version
helix 22.05-dev (3a398ee)
The text was updated successfully, but these errors were encountered: