Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Don't error when transposing a single character (#45420)
This fixes an issue where an error would be thrown in the REPL if you tried to transpose an input that was a single character while your cursor was to the right of that character (e.g., "A|"). To fix this, let's move left once before we check for if we're at the start of a line. This does change behavior slightly in that the cursor can move left once without actually transposing anything, but this seems to match what Emacs does with M-x transpose-chars in an equivalent situation.
- Loading branch information