You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
* Add --socket flag (coder#564)
* Add --socket flag
* Add msg for already bound socket
* Bundle grammars (coder#563)
* Fix clipboard pasting
* Remove log statement from copy
* Offer https/http url based on schema (coder#572)
* Let people know when telemetry is disabled, change url to https if secure connection
* Remove --no-auth as a http candidate
* Rename variable, change let to const
* Fix no-auth to still use HTTPS, set default for no-auth to false (coder#573)
* Fix markdown preview focus (coder#546)
* Fix hash
* Remove whitespace
@@ -181 +183 @@ class ExecCommandPasteAction extends ExecCommandAction {
270
+
@@ -181 +184 @@ class ExecCommandPasteAction extends ExecCommandAction {
263
271
- precondition: EditorContextKeys.writable,
264
272
+ precondition: (require('vs/platform/contextkey/common/contextkey') as typeof import('vs/platform/contextkey/common/contextkey')).ContextKeyExpr.and(EditorContextKeys.writable, workbench.clipboardContextKey),
265
-
@@ -191 +193,2 @@ class ExecCommandPasteAction extends ExecCommandAction {
273
+
@@ -191 +194,2 @@ class ExecCommandPasteAction extends ExecCommandAction {
266
274
- order: 3
267
275
+ order: 3,
268
276
+ when: workbench.clipboardContextKey,
269
-
@@ -194,0 +198,14 @@ class ExecCommandPasteAction extends ExecCommandAction {
277
+
@@ -194,0 +199,26 @@ class ExecCommandPasteAction extends ExecCommandAction {
270
278
+
271
279
+ public async run(accessor, editor: ICodeEditor): Promise<void> {
272
280
+ if (editor instanceof (require('vs/editor/browser/widget/codeEditorWidget') as typeof import('vs/editor/browser/widget/codeEditorWidget')).CodeEditorWidget) {
273
281
+ try {
274
-
+ editor.trigger('', (require('vs/editor/common/editorCommon') as typeof import ('vs/editor/common/editorCommon')).Handler.Paste, {
275
-
+ text: await (require('vs/../../../../packages/vscode/src/workbench') as typeof import ('vs/../../../../packages/vscode/src/workbench')).workbench.clipboardText,
282
+
+ editor.focus();
283
+
+ const textInput = document.activeElement! as HTMLTextAreaElement;
284
+
+ const dataTransfer = new DataTransfer();
285
+
+ const value = await clipboard.readText();
286
+
+ dataTransfer.setData("text/plain", value);
287
+
+ const pasteEvent = new ClipboardEvent("paste", {
288
+
+ clipboardData: dataTransfer,
276
289
+ });
290
+
+ textInput.dispatchEvent(pasteEvent);
277
291
+ } catch (ex) {
278
-
+ super.run(accessor, editor);
292
+
+ try {
293
+
+ editor.trigger('', (require('vs/editor/common/editorCommon') as typeof import ('vs/editor/common/editorCommon')).Handler.Paste, {
294
+
+ text: await (require('vs/../../../../packages/vscode/src/workbench') as typeof import ('vs/../../../../packages/vscode/src/workbench')).workbench.clipboardText,
0 commit comments