Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug] applyEdits nonsupport undoed #4794

Open
1 of 2 tasks
1739616529 opened this issue Dec 26, 2024 · 0 comments
Open
1 of 2 tasks

[Bug] applyEdits nonsupport undoed #4794

1739616529 opened this issue Dec 26, 2024 · 0 comments

Comments

@1739616529
Copy link

Reproducible in vscode.dev or in VS Code Desktop?

  • Not reproducible in vscode.dev or VS Code Desktop

Reproducible in the monaco editor playground?

Monaco Editor Playground Link

version: v0.52.2
description: monaco editor playground error

Monaco Editor Playground Code

const value = /* set from `myEditor.getModel()`: */ `function hello() {
	alert('Hello world!');
}`;

// Hover on each property to see its docs!
const myEditor = monaco.editor.create(document.getElementById("container"), {
	value,
	language: "javascript",
	automaticLayout: true,
});
myEditor.addAction({
    id: "dys.a.c",
    label: "test",
    keybindings: [KeyMod.CtrlCmd | KeyCode.KeyS],
    run() {
        // myEditor.pushUndoStop();
        myEditor.getModel()?.applyEdits([{ text: "312", range: new Range(1, 1, 10, 10) }], true)
        // myEditor.popUndoStop()
    }
})

Reproduction Steps

ctrl + s

Actual (Problematic) Behavior

Not after changing the code unoded

Expected Behavior

The code should be withdrawn from the previous

Additional Context

No response

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant