From 00bfc3cb5da01027856ff8bd9817ec7c06f9a92c Mon Sep 17 00:00:00 2001 From: psyGamer Date: Tue, 3 Sep 2024 10:02:56 +0200 Subject: [PATCH] Scroll caret into view after following Read/Play command --- Studio/CelesteStudio/Editing/Editor.cs | 3 +++ 1 file changed, 3 insertions(+) diff --git a/Studio/CelesteStudio/Editing/Editor.cs b/Studio/CelesteStudio/Editing/Editor.cs index 58918829b..55088889e 100644 --- a/Studio/CelesteStudio/Editing/Editor.cs +++ b/Studio/CelesteStudio/Editing/Editor.cs @@ -2953,6 +2953,8 @@ private void UpdateMouseAction(PointF location, Keys modifiers) { } else { Document.Caret = new CaretPosition(0, 0); } + Recalc(); + ScrollCaretIntoView(center: true); }; } @@ -2975,6 +2977,7 @@ private void UpdateMouseAction(PointF location, Keys modifiers) { Document.Caret.Row = labelRow; Document.Caret.Col = desiredVisualCol = Document.Lines[labelRow].Length; Recalc(); + ScrollCaretIntoView(center: true); }; }