From 859acc243d66cf11e3ce3fca749ce0aec3e4fc5b Mon Sep 17 00:00:00 2001 From: _Kristof_ Date: Wed, 1 Oct 2025 23:09:11 +0200 Subject: [PATCH] fix copy not using TrueSelection (which was causing issues if selecting from end to start) --- VTMLEditor/GuiElements/Vanilla/GuiElementEditableTextBase.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/VTMLEditor/GuiElements/Vanilla/GuiElementEditableTextBase.cs b/VTMLEditor/GuiElements/Vanilla/GuiElementEditableTextBase.cs index a66df5e..225a174 100644 --- a/VTMLEditor/GuiElements/Vanilla/GuiElementEditableTextBase.cs +++ b/VTMLEditor/GuiElements/Vanilla/GuiElementEditableTextBase.cs @@ -453,8 +453,8 @@ public void InsertTextAtCursor(string insert) // If there is a selection, replace the selected text if (HasSelection) { - int start = SelectionStartWithoutLineBreaks; - int end = SelectionEndWithoutLineBreaks; + int start = TrueSelectionStartWithoutLineBreaks; + int end = TrueSelectionEndWithoutLineBreaks; fulltext = fulltext[..start] + insert + fulltext[end..]; newCaretPos = start + insert.Length; }