Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 9 additions & 2 deletions TextControlBox/Core/Text/TextActionManager.cs
Original file line number Diff line number Diff line change
Expand Up @@ -500,8 +500,15 @@ public void AddCharacter(string text, bool ignoreSelection = false, bool ignoreI
}

eventsManager.CallTextChanged();
scrollManager.ScrollLineIntoViewIfOutside(cursorManager.LineNumber, false);

// Keep the caret visible after typing using the same helper every other edit
// operation uses. Backspace, Delete, AddNewLine, Undo and Redo all call
// UpdateScrollToShowCursor; AddCharacter was the only one still using the
// line-granularity ScrollLineIntoViewIfOutside, which does not scroll while the
// caret stays on the same (long) line, so a caret typed past the right edge could
// fall outside the rendered area. Using the shared helper makes the caret follow
// consistent with the rest of the edit operations.
scrollManager.UpdateScrollToShowCursor(false);

canvasUpdateManager.UpdateAll();
}

Expand Down