Skip to content

Commit

Permalink
Fix typo
Browse files Browse the repository at this point in the history
  • Loading branch information
Skalakid committed Apr 23, 2024
1 parent 451302d commit d8231f7
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/web/cursorUtils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ function setCursorPosition(target: HTMLElement, start: number, end: number | nul
// There are 4 cases to consider here:
// 1. Caret in front of a character, when pressing enter
// 2. Caret at the end of a line (not last one)
// 3. Caret at the end of whole input, when pressing enter - On
// 3. Caret at the end of whole input, when pressing enter
// 4. All other placements
if (prevChar === '\n' && prevTextLength !== undefined && prevTextLength < textCharacters.length) {
if (nextChar !== '\n') {
Expand Down

0 comments on commit d8231f7

Please sign in to comment.