Skip to content

Commit 9f9e5a9

Browse files
1 parent d1f823a commit 9f9e5a9

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

newIDE/app/patches/monaco-editor+0.14.3.patch

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
diff --git a/node_modules/monaco-editor/esm/vs/editor/contrib/clipboard/clipboard.js b/node_modules/monaco-editor/esm/vs/editor/contrib/clipboard/clipboard.js
22
--- a/node_modules/monaco-editor/esm/vs/editor/contrib/clipboard/clipboard.js
33
+++ b/node_modules/monaco-editor/esm/vs/editor/contrib/clipboard/clipboard.js
4-
@@ -49,7 +49,20 @@
4+
@@ -49,7 +49,25 @@
55
};
66
ExecCommandAction.prototype.run = function (accessor, editor) {
77
editor.focus();
@@ -14,7 +14,12 @@ diff --git a/node_modules/monaco-editor/esm/vs/editor/contrib/clipboard/clipboar
1414
+ try {
1515
+ var text = window.require('electron').clipboard.readText();
1616
+ if (text) {
17-
+ editor.trigger('keyboard', 'type', { text: text });
17+
+ var selection = editor.getSelection();
18+
+ editor.executeEdits('paste', [{
19+
+ range: selection,
20+
+ text: text,
21+
+ forceMoveMarkers: true
22+
+ }]);
1823
+ }
1924
+ } catch (e) {
2025
+ // Not in Electron environment, ignore

0 commit comments

Comments
 (0)