From 45419393ae5ae15cecf022280453d743e325851c Mon Sep 17 00:00:00 2001 From: Levi Neely Date: Fri, 10 Jul 2026 11:43:48 +0200 Subject: [PATCH] gui: allow text selection in chat area - Enable selectByMouse on chatArea TextArea - Only auto-scroll to bottom when no text is selected --- gui/main-kf5.qml | 4 +++- gui/main.qml | 4 +++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/gui/main-kf5.qml b/gui/main-kf5.qml index 44bbd6b..9e2fdd0 100644 --- a/gui/main-kf5.qml +++ b/gui/main-kf5.qml @@ -365,6 +365,7 @@ ApplicationWindow { TextArea { id: chatArea readOnly: true + selectByMouse: true wrapMode: TextEdit.Wrap text: dbus.chatText || (dbus.activeSessionId ? "(waiting for output...)" @@ -374,7 +375,8 @@ ApplicationWindow { background: null onTextChanged: { - cursorPosition = text.length + if (selectedText.length === 0) + cursorPosition = text.length } } } diff --git a/gui/main.qml b/gui/main.qml index 0287bb4..60ccf99 100644 --- a/gui/main.qml +++ b/gui/main.qml @@ -371,6 +371,7 @@ ApplicationWindow { TextArea { id: chatArea readOnly: true + selectByMouse: true wrapMode: TextEdit.Wrap text: dbus.chatText || (dbus.activeSessionId ? "(waiting for output...)" @@ -382,7 +383,8 @@ ApplicationWindow { background: null onTextChanged: { - cursorPosition = text.length + if (selectedText.length === 0) + cursorPosition = text.length } } }