From c07a8ff8f6692668c0c65a7e8f09fa9884634a4a Mon Sep 17 00:00:00 2001 From: Twan van Laarhoven Date: Sun, 21 Jun 2020 13:51:20 +0200 Subject: [PATCH] Fix: autoreplace could go out of bounds --- src/gui/value/text.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/src/gui/value/text.cpp b/src/gui/value/text.cpp index 8a6c4d36..47b35968 100644 --- a/src/gui/value/text.cpp +++ b/src/gui/value/text.cpp @@ -1045,6 +1045,7 @@ void TextValueEditor::tryAutoReplace() { selection_end_i = end; fixSelection(TYPE_INDEX); replaceSelection(ar->replace, _ACTION_("auto replace"), false, false); + end = selection_start_i; } } }