Skip to content

Commit 133d391

Browse files
committed
Don't toggle lines' patch status when selecting text
This isn't perfect, but it's better than it was before.
1 parent e60c51e commit 133d391

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

Diff for: components/textdiff/textdiff.js

+3
Original file line numberDiff line numberDiff line change
@@ -202,6 +202,9 @@ class TextDiffViewModel {
202202
}
203203

204204
togglePatchLine(index) {
205+
// Selecting text, not toggling the line's patch status
206+
if (window.getSelection().toString().length !== 0) return true;
207+
205208
this.patchLineList()[index] = !this.patchLineList()[index];
206209

207210
if (this.patchLineList().filter(Boolean).length === 0) {

0 commit comments

Comments
 (0)