diff --git a/src/editor.ts b/src/editor.ts index 7b2043a..347ad41 100644 --- a/src/editor.ts +++ b/src/editor.ts @@ -26,6 +26,12 @@ export class Editor { }); } + onCancel() : void { + this.keybindProgressMode = KeybindProgressMode.None; // cancel long keybinding in progress (if any) + this.setStatusBarPermanentMessage(""); + this.setStatusBarMessage("Quit"); + } + setStatusBarMessage(text: string): vscode.Disposable { return vscode.window.setStatusBarMessage(text, 1000); } diff --git a/src/operation.ts b/src/operation.ts index 46c5f8f..3f7794b 100644 --- a/src/operation.ts +++ b/src/operation.ts @@ -43,7 +43,7 @@ export class Operation { this.editor.setStatusBarMessage("Undo!"); }, 'C-g': () => { - this.editor.setStatusBarMessage("Quit"); + this.editor.onCancel(); }, "C-x_r": () => { this.editor.setRMode();