diff --git a/app/src/lib/components/HunkLine.svelte b/app/src/lib/components/HunkLine.svelte
deleted file mode 100644
index 5436ed3bc..000000000
--- a/app/src/lib/components/HunkLine.svelte
+++ /dev/null
@@ -1,124 +0,0 @@
-
-
-
-
-
-
-
-
-
- {@html toTokens(line.content).join('')}
-
-
-
-
-
diff --git a/app/src/lib/components/HunkSection.svelte b/app/src/lib/components/HunkLines.svelte
similarity index 79%
rename from app/src/lib/components/HunkSection.svelte
rename to app/src/lib/components/HunkLines.svelte
index fd2a953e9..0972dfc59 100644
--- a/app/src/lib/components/HunkSection.svelte
+++ b/app/src/lib/components/HunkLines.svelte
@@ -1,14 +1,8 @@
{
+ on:contextmenu={(event) => {
const lineNumber = line.afterLineNumber
? line.afterLineNumber
: line.beforeLineNumber;
- popupMenu.openByMouse(e, {
- hunk,
- lineNumber,
- section: subsection
- });
+ dispatch('lineContextMenu', { event, lineNumber });
}}
>
diff --git a/app/src/lib/components/HunkViewer.svelte b/app/src/lib/components/HunkViewer.svelte
index f51368992..6916eafe8 100644
--- a/app/src/lib/components/HunkViewer.svelte
+++ b/app/src/lib/components/HunkViewer.svelte
@@ -1,19 +1,22 @@
@@ -63,19 +81,24 @@
{:else}
{#each section.subSections as subsection}
{@const hunk = section.hunk}
- onHunkSelected(hunk, e.detail)}
sectionType={subsection.sectionType}
+ on:lineContextMenu={(e) => {
+ popupMenu.openByMouse(e.detail.event, {
+ hunk,
+ section: subsection,
+ lineNumber: e.detail.lineNumber
+ });
+ }}
/>
{/each}
{/if}