From 8b9681dc7840e9b8af8a8ab8a6b6b376f3dabba6 Mon Sep 17 00:00:00 2001 From: miruka Date: Fri, 29 May 2020 17:20:40 -0400 Subject: [PATCH] =?UTF-8?q?Rename=20HTextArea.append()=20=E2=86=92=20.inse?= =?UTF-8?q?rtAtCursor()?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/gui/Base/HTextArea.qml | 2 +- src/gui/Pages/Chat/Composer/MessageArea.qml | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/gui/Base/HTextArea.qml b/src/gui/Base/HTextArea.qml index 0d5d8704..6735fc40 100644 --- a/src/gui/Base/HTextArea.qml +++ b/src/gui/Base/HTextArea.qml @@ -20,7 +20,7 @@ TextArea { function reset() { clear(); text = defaultText } - function append(text) { insert(cursorPosition, text) } + function insertAtCursor(text) { insert(cursorPosition, text) } text: defaultText diff --git a/src/gui/Pages/Chat/Composer/MessageArea.qml b/src/gui/Pages/Chat/Composer/MessageArea.qml index 9156cdee..6755bc64 100644 --- a/src/gui/Pages/Chat/Composer/MessageArea.qml +++ b/src/gui/Pages/Chat/Composer/MessageArea.qml @@ -75,7 +75,7 @@ HTextArea { } const add = indent.repeat(indents) - textArea.append("\n" + add) + textArea.insertAtCursor("\n" + add) } function sendText() { @@ -176,7 +176,7 @@ HTextArea { Keys.onTabPressed: ev => { ev.accepted = true - textArea.append(indent) + textArea.insertAtCursor(indent) } Keys.onPressed: ev => {