Skip to content

Commit cf293d6

Browse files
author
Loïc Mangeonjean
committed
cleanup: remove useless deprecated code
1 parent 4676eae commit cf293d6

File tree

1 file changed

+1
-27
lines changed

1 file changed

+1
-27
lines changed

src/tools.ts

Lines changed: 1 addition & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import * as monaco from 'monaco-editor'
2-
import { ContextKeyExpr, DisposableStore, KeybindingsRegistry } from 'vscode/monaco'
2+
import { DisposableStore } from 'vscode/monaco'
33

44
interface 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') {

0 commit comments

Comments
 (0)