File tree Expand file tree Collapse file tree 1 file changed +7
-2
lines changed
Expand file tree Collapse file tree 1 file changed +7
-2
lines changed Original file line number Diff line number Diff line change 11diff --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
You can’t perform that action at this time.
0 commit comments