Skip to content

Commit 8189caf

Browse files
committed
fix Shift+Insert paste on Linux
Do not delete the text after the cursor/selection.
1 parent 4d30886 commit 8189caf

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

common/content/editor.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,8 @@ const Editor = Module("editor", {
8383
let rangeEnd = elem.selectionEnd;
8484
let tempStr1 = elem.value.substring(0, rangeStart);
8585
let tempStr2 = util.readFromClipboard();
86-
elem.value = tempStr1 + tempStr2;
86+
let tempStr3 = elem.value.substring(rangeEnd);
87+
elem.value = tempStr1 + tempStr2 + tempStr3;
8788
elem.selectionStart = rangeStart + tempStr2.length;
8889
elem.selectionEnd = elem.selectionStart;
8990

0 commit comments

Comments
 (0)