File tree Expand file tree Collapse file tree 1 file changed +1
-27
lines changed Expand file tree Collapse file tree 1 file changed +1
-27
lines changed Original file line number Diff line number Diff line change 11import * as monaco from 'monaco-editor'
2- import { ContextKeyExpr , DisposableStore , KeybindingsRegistry } from 'vscode/monaco'
2+ import { DisposableStore } from 'vscode/monaco'
33
44interface PastePayload {
55 text : string
@@ -497,32 +497,6 @@ export function mapClipboard (
497497 const disposableStore = new DisposableStore ( )
498498 let copiedText = ''
499499
500- disposableStore . add (
501- KeybindingsRegistry . registerCommandAndKeybindingRule ( {
502- id : 'customCopy' ,
503- weight : 1000 ,
504- handler : ( ) => {
505- copiedText = editor . getModel ( ) ! . getValueInRange ( editor . getSelection ( ) ! )
506- document . execCommand ( 'copy' )
507- } ,
508- when : ContextKeyExpr . equals ( 'editorId' , editor . getId ( ) ) ,
509- primary : monaco . KeyMod . CtrlCmd | monaco . KeyCode . KeyC
510- } )
511- )
512-
513- disposableStore . add (
514- KeybindingsRegistry . registerCommandAndKeybindingRule ( {
515- id : 'customCut' ,
516- weight : 1000 ,
517- handler : ( ) => {
518- copiedText = editor . getModel ( ) ! . getValueInRange ( editor . getSelection ( ) ! )
519- document . execCommand ( 'cut' )
520- } ,
521- when : ContextKeyExpr . equals ( 'editorId' , editor . getId ( ) ) ,
522- primary : monaco . KeyMod . CtrlCmd | monaco . KeyCode . KeyX
523- } )
524- )
525-
526500 const originalTrigger = editor . trigger
527501 editor . trigger = function ( source , handlerId , payload ) {
528502 if ( handlerId === 'editor.action.clipboardCopyAction' ) {
You can’t perform that action at this time.
0 commit comments