Skip to content

cmd c not working in settings view when overriding the clipboardCopyAction #221440

Closed as not planned
@hans000

Description

Does this issue occur when all extensions are disabled?: Yes/No

  • VS Code Version: 1.91
  • OS Version: macos

Steps to Reproduce:

  1. override the clipboardCopyAction

reference https://stackoverflow.com/questions/44598894/in-a-vs-code-extension-how-can-i-be-notified-when-the-user-cuts-copies-or-paste


function overriddenClipboardCopyAction(textEditor, edit, params) {

    //debug
    console.log("---COPY TEST---");

    //use the selected text that is being copied here
    getCurrentSelectionEvents(); //not shown for brevity

    //dispose of the overridden editor.action.clipboardCopyAction- back to default copy behavior
    clipboardCopyDisposable.dispose();

    //execute the default editor.action.clipboardCopyAction to copy
    vscode.commands.executeCommand("editor.action.clipboardCopyAction").then(function(){

        console.log("After Copy");

        //add the overridden editor.action.clipboardCopyAction back
        clipboardCopyDisposable = vscode.commands.registerTextEditorCommand('editor.action.clipboardCopyAction', overriddenClipboardCopyAction);

        context.subscriptions.push(clipboardCopyDisposable);
    }); 
}
  1. try to copy text with cmd + c in settings view, it's not working. and others can be working(terminal, editor...)

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Assignees

Labels

bugIssue identified by VS Code Team member as probable bugconfirmation-pendinginfo-neededIssue requires more information from postersettings-editorVS Code settings editor issues

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions