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

Fix to simply override replacePreviousChar command without no effects in order for type command to work correctly #383

Closed
wants to merge 2 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"name": "emacs-mcx",
"displayName": "Awesome Emacs Keymap",
"description": "Emacs Friendly Keymap with multi cursor support, improved mark-mode experience, clipboard and kill-ring integration, and lots of improvements and bug fixes.",
"version": "0.20.2",
"version": "0.21.0-dev0",
"publisher": "tuttieee",
"repository": {
"type": "git",
Expand Down
8 changes: 8 additions & 0 deletions src/extension.ts
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,14 @@ export function activate(context: vscode.ExtensionContext) {
(args) => vscode.commands.executeCommand("default:type", args)
);

// Simply override replacePreviousChar command without any effects in order for overridden `type` command to work correctly.
// See https://github.com/microsoft/vscode/issues/102291#issuecomment-661758632
context.subscriptions.push(
vscode.commands.registerCommand("replacePreviousChar", (...args) =>
vscode.commands.executeCommand("default:replacePreviousChar", ...args)
)
);

moveCommandIds.map((commandName) => {
registerEmulatorCommand(`emacs-mcx.${commandName}`, (emulator) => {
emulator.runCommand(commandName);
Expand Down