diff --git a/src/components/CopyButton.svelte b/src/components/CopyButton.svelte
new file mode 100644
index 000000000..5d42b50de
--- /dev/null
+++ b/src/components/CopyButton.svelte
@@ -0,0 +1,46 @@
+
+
+
+
+
diff --git a/src/components/DiffRow.svelte b/src/components/DiffRow.svelte
index b2869f063..1777ba9e3 100644
--- a/src/components/DiffRow.svelte
+++ b/src/components/DiffRow.svelte
@@ -4,7 +4,9 @@
import escape from "lodash/escape";
import type { DiffRow } from "@app/lib/diffRows";
+ import { fileDiffToText } from "@app/lib/diffText";
+ import CopyButton from "@app/components/CopyButton.svelte";
import Icon from "@app/components/Icon.svelte";
import Path from "@app/components/Path.svelte";
@@ -191,6 +193,7 @@
-{row.file.diff.stats.deletions}
{/if}
+ fileDiffToText(row.file)} title="Copy file diff" />
{:else if row.type === "hunk-header"}
+ diffToText(diff)} title="Copy diff" />