It would be nice to automatically escape special characters when pasting content into a string. If the paste operation triggered an escaping operation, then the first Undo operation after paste would undo just the character escaping.
| First position of copied region |
Pasting outside a literal |
Pasting inside a literal |
| Inside a text literal |
Unescape on paste |
Correct escape sequences that change meaning |
| Outside a text literal |
As-is |
Escape on paste |
| Raw text (e.g. browser) |
As-is |
Escape on paste |
It would be nice to automatically escape special characters when pasting content into a string. If the paste operation triggered an escaping operation, then the first Undo operation after paste would undo just the character escaping.