From 1e01c5dadb367e38284c8cf78ecb5b34ea30c0fd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=89milie=20Feral?= Date: Tue, 7 May 2019 17:13:13 +0200 Subject: [PATCH] [escher] TextArea: fix cursor position when handling text with UCodePointEmpty --- escher/src/text_area.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/escher/src/text_area.cpp b/escher/src/text_area.cpp index d8bf93d67..86bb1d560 100644 --- a/escher/src/text_area.cpp +++ b/escher/src/text_area.cpp @@ -72,7 +72,7 @@ bool TextArea::handleEventWithText(const char * text, bool indentation, bool for // Insert the text if (insertTextAtLocation(buffer, cursorLocation())) { // Set the cursor location - const char * nextCursorLocation = cursorLocation() + (forceCursorRightOfText ? strlen(buffer) : cursorPositionInCommand - text); + const char * nextCursorLocation = cursorLocation() + (forceCursorRightOfText ? strlen(buffer) : cursorPositionInCommand - buffer); setCursorLocation(nextCursorLocation); } return true;