fix: Copy selected in code block instead all

This commit is contained in:
Petr Mironychev
2025-10-12 12:03:12 +02:00
parent d285ab6117
commit bcb0c6f761

View File

@ -118,7 +118,10 @@ Rectangle {
Platform.MenuItem {
text: qsTr("Copy")
onTriggered: utils.copyToClipboard(root.code)
onTriggered: {
const textToCopy = codeText.selectedText || root.code
utils.copyToClipboard(textToCopy)
}
}
Platform.MenuSeparator {}