gui: allow text selection in chat area

- Enable selectByMouse on chatArea TextArea
- Only auto-scroll to bottom when no text is selected
This commit is contained in:
Levi Neely 2026-07-10 11:43:48 +02:00
parent dc1816f023
commit 45419393ae
2 changed files with 6 additions and 2 deletions

View File

@ -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
}
}
}

View File

@ -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
}
}
}