aboutsummaryrefslogtreecommitdiffstats
path: root/desktop/assistant/Segments.qml
diff options
context:
space:
mode:
Diffstat (limited to 'desktop/assistant/Segments.qml')
-rw-r--r--desktop/assistant/Segments.qml8
1 files changed, 6 insertions, 2 deletions
diff --git a/desktop/assistant/Segments.qml b/desktop/assistant/Segments.qml
index 2b68b64..cd216df 100644
--- a/desktop/assistant/Segments.qml
+++ b/desktop/assistant/Segments.qml
@@ -45,7 +45,9 @@ Column {
color: Theme.text
selectionColor: Qt.alpha(Theme.accent, 0.4)
font { family: Theme.fontFamily; pixelSize: Theme.fontSize - 2 }
- onLinkActivated: link => Qt.openUrlExternally(link)
+ // Web and mail links only: a model-written file: or custom
+ // scheme link would be handed to xdg-open.
+ onLinkActivated: link => { if (/^(https?|mailto):/i.test(link)) Qt.openUrlExternally(link); }
HoverHandler { cursorShape: prose.hoveredLink ? Qt.PointingHandCursor : Qt.IBeamCursor }
}
@@ -77,7 +79,9 @@ Column {
anchors { right: parent.right; top: parent.top; margins: 6 }
visible: !part.modelData.open
width: visible ? implicitWidth : 0
- text: copied.running ? "Copied" : (part.modelData.lang || "Copy")
+ text: copied.running ? "Copied" : "Copy"
+ // ponytail: one argv string, so a block over 128 KiB
+ // (MAX_ARG_STRLEN) fails to copy; stdin if that matters.
onClicked: {
Quickshell.execDetached(["wl-copy", "--", part.modelData.text]);
copied.restart();