diff options
author | HampusM <hampus@hampusmat.com> | 2021-06-03 13:10:55 +0200 |
---|---|---|
committer | HampusM <hampus@hampusmat.com> | 2021-06-03 13:10:55 +0200 |
commit | 4e3074dfd752dd52951d300090c642aee76cfaac (patch) | |
tree | 19a9cf48584123edab3dfca5b201860e99d7f711 /src/frontend/components/CommitPatch.vue | |
parent | 5e131ddb475de7cd9821c4a0245fc5c64035a6b4 (diff) |
Made patch line nr and +/- columns unselectable
Diffstat (limited to 'src/frontend/components/CommitPatch.vue')
-rw-r--r-- | src/frontend/components/CommitPatch.vue | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/src/frontend/components/CommitPatch.vue b/src/frontend/components/CommitPatch.vue index 334c0ba..2c815ff 100644 --- a/src/frontend/components/CommitPatch.vue +++ b/src/frontend/components/CommitPatch.vue @@ -57,9 +57,9 @@ export default { new_offset++; deleted_offset++; return h("tr", { class: "commit-file-pos-change" }, [ - h("td", "..."), - h("td", "..."), - h("td", "..."), + h("td", { "patch-line-col-unsel": "..." }), + h("td", { "patch-line-col-unsel": "..." }), + h("td", { "patch-line-col-unsel": "..." }), h("td", [ h("code", all_hunks[hunk_index][line_index]) ]) @@ -84,19 +84,19 @@ export default { if(hunk['new'].includes(line_index)) { first_td = h("td", ""); - second_td = h("td", { class: "line-highlight-new" }, Number(hunk["new_start"]) + line_index - new_offset); - third_td = h("td", { class: "line-new" }, "+"); + second_td = h("td", { class: "line-highlight-new", "patch-line-col-unsel": Number(hunk["new_start"]) + line_index - new_offset }); + third_td = h("td", { class: "line-new", "patch-line-col-unsel": "+" }); deleted_offset++; } else if(hunk['deleted'].includes(line_index)) { - first_td = h("td", Number(hunk["old_start"]) + line_index - deleted_offset); + first_td = h("td", { "patch-line-col-unsel": Number(hunk["old_start"]) + line_index - deleted_offset }); second_td = h("td", { class: "line-highlight-deleted" }); - third_td = h("td", { class: "line-deleted" }, "-"); + third_td = h("td", { class: "line-deleted", "patch-line-col-unsel": "-" }); new_offset++; } else { - first_td = h("td", { class: "line-unchanged" }, Number(hunk["old_start"]) + line_index - deleted_offset); - second_td = h("td", { class: "line-unchanged" }, Number(hunk["new_start"]) + line_index - new_offset); + first_td = h("td", { class: "line-unchanged", "patch-line-col-unsel": Number(hunk["old_start"]) + line_index - deleted_offset }); + second_td = h("td", { class: "line-unchanged", "patch-line-col-unsel": Number(hunk["new_start"]) + line_index - new_offset }); third_td = h("td", ""); } |