From dea42d245feb326c8d92b0e4dfad41846da87f7f Mon Sep 17 00:00:00 2001 From: "Yuichiro Tachibana (Tsuchiya)" Date: Sun, 30 Jan 2022 18:00:05 +0900 Subject: [PATCH] Rename emacs-mcx.universalArgumentDigit to emacs-mcx.subsequentArgumentDigit --- keybinding-generator/generate-keybindings.ts | 2 +- package.json | 100 +++++++++--------- src/emulator.ts | 4 +- src/extension.ts | 4 +- src/prefix-argument.ts | 10 +- src/test/suite/commands/edit.test.ts | 4 +- .../commands/kill-yank/kill-line.test.ts | 8 +- src/test/suite/commands/move.test.ts | 4 +- src/test/suite/commands/paredit.test.ts | 10 +- .../prefix-arguments/digit-argument.test.ts | 6 +- .../universal-argument.test.ts | 38 +++---- 11 files changed, 95 insertions(+), 95 deletions(-) diff --git a/keybinding-generator/generate-keybindings.ts b/keybinding-generator/generate-keybindings.ts index 08d264256d..a120bf228e 100644 --- a/keybinding-generator/generate-keybindings.ts +++ b/keybinding-generator/generate-keybindings.ts @@ -191,7 +191,7 @@ export function generateKeybindingsForPrefixArgument(): KeyBinding[] { ...generateKeybindings({ keys: [num.toString(), `meta+${num.toString()}`], when: "emacs-mcx.acceptingArgument && editorTextFocus", - command: "emacs-mcx.universalArgumentDigit", + command: "emacs-mcx.subsequentArgumentDigit", args: [num], }) ); diff --git a/package.json b/package.json index ff8c962990..5c46a48c50 100644 --- a/package.json +++ b/package.json @@ -123,7 +123,7 @@ }, { "key": "0", - "command": "emacs-mcx.universalArgumentDigit", + "command": "emacs-mcx.subsequentArgumentDigit", "when": "emacs-mcx.acceptingArgument && editorTextFocus", "args": [ 0 @@ -131,7 +131,7 @@ }, { "key": "alt+0", - "command": "emacs-mcx.universalArgumentDigit", + "command": "emacs-mcx.subsequentArgumentDigit", "when": "emacs-mcx.acceptingArgument && editorTextFocus && !config.emacs-mcx.useMetaPrefixMacCmd", "args": [ 0 @@ -140,7 +140,7 @@ { "key": "alt+0", "mac": "cmd+0", - "command": "emacs-mcx.universalArgumentDigit", + "command": "emacs-mcx.subsequentArgumentDigit", "when": "emacs-mcx.acceptingArgument && editorTextFocus && config.emacs-mcx.useMetaPrefixMacCmd", "args": [ 0 @@ -148,7 +148,7 @@ }, { "key": "escape 0", - "command": "emacs-mcx.universalArgumentDigit", + "command": "emacs-mcx.subsequentArgumentDigit", "when": "emacs-mcx.acceptingArgument && editorTextFocus && config.emacs-mcx.useMetaPrefixEscape", "args": [ 0 @@ -156,7 +156,7 @@ }, { "key": "ctrl+[ 0", - "command": "emacs-mcx.universalArgumentDigit", + "command": "emacs-mcx.subsequentArgumentDigit", "when": "emacs-mcx.acceptingArgument && editorTextFocus && config.emacs-mcx.useMetaPrefixCtrlLeftBracket", "args": [ 0 @@ -205,7 +205,7 @@ }, { "key": "1", - "command": "emacs-mcx.universalArgumentDigit", + "command": "emacs-mcx.subsequentArgumentDigit", "when": "emacs-mcx.acceptingArgument && editorTextFocus", "args": [ 1 @@ -213,7 +213,7 @@ }, { "key": "alt+1", - "command": "emacs-mcx.universalArgumentDigit", + "command": "emacs-mcx.subsequentArgumentDigit", "when": "emacs-mcx.acceptingArgument && editorTextFocus && !config.emacs-mcx.useMetaPrefixMacCmd", "args": [ 1 @@ -222,7 +222,7 @@ { "key": "alt+1", "mac": "cmd+1", - "command": "emacs-mcx.universalArgumentDigit", + "command": "emacs-mcx.subsequentArgumentDigit", "when": "emacs-mcx.acceptingArgument && editorTextFocus && config.emacs-mcx.useMetaPrefixMacCmd", "args": [ 1 @@ -230,7 +230,7 @@ }, { "key": "escape 1", - "command": "emacs-mcx.universalArgumentDigit", + "command": "emacs-mcx.subsequentArgumentDigit", "when": "emacs-mcx.acceptingArgument && editorTextFocus && config.emacs-mcx.useMetaPrefixEscape", "args": [ 1 @@ -238,7 +238,7 @@ }, { "key": "ctrl+[ 1", - "command": "emacs-mcx.universalArgumentDigit", + "command": "emacs-mcx.subsequentArgumentDigit", "when": "emacs-mcx.acceptingArgument && editorTextFocus && config.emacs-mcx.useMetaPrefixCtrlLeftBracket", "args": [ 1 @@ -287,7 +287,7 @@ }, { "key": "2", - "command": "emacs-mcx.universalArgumentDigit", + "command": "emacs-mcx.subsequentArgumentDigit", "when": "emacs-mcx.acceptingArgument && editorTextFocus", "args": [ 2 @@ -295,7 +295,7 @@ }, { "key": "alt+2", - "command": "emacs-mcx.universalArgumentDigit", + "command": "emacs-mcx.subsequentArgumentDigit", "when": "emacs-mcx.acceptingArgument && editorTextFocus && !config.emacs-mcx.useMetaPrefixMacCmd", "args": [ 2 @@ -304,7 +304,7 @@ { "key": "alt+2", "mac": "cmd+2", - "command": "emacs-mcx.universalArgumentDigit", + "command": "emacs-mcx.subsequentArgumentDigit", "when": "emacs-mcx.acceptingArgument && editorTextFocus && config.emacs-mcx.useMetaPrefixMacCmd", "args": [ 2 @@ -312,7 +312,7 @@ }, { "key": "escape 2", - "command": "emacs-mcx.universalArgumentDigit", + "command": "emacs-mcx.subsequentArgumentDigit", "when": "emacs-mcx.acceptingArgument && editorTextFocus && config.emacs-mcx.useMetaPrefixEscape", "args": [ 2 @@ -320,7 +320,7 @@ }, { "key": "ctrl+[ 2", - "command": "emacs-mcx.universalArgumentDigit", + "command": "emacs-mcx.subsequentArgumentDigit", "when": "emacs-mcx.acceptingArgument && editorTextFocus && config.emacs-mcx.useMetaPrefixCtrlLeftBracket", "args": [ 2 @@ -369,7 +369,7 @@ }, { "key": "3", - "command": "emacs-mcx.universalArgumentDigit", + "command": "emacs-mcx.subsequentArgumentDigit", "when": "emacs-mcx.acceptingArgument && editorTextFocus", "args": [ 3 @@ -377,7 +377,7 @@ }, { "key": "alt+3", - "command": "emacs-mcx.universalArgumentDigit", + "command": "emacs-mcx.subsequentArgumentDigit", "when": "emacs-mcx.acceptingArgument && editorTextFocus && !config.emacs-mcx.useMetaPrefixMacCmd", "args": [ 3 @@ -386,7 +386,7 @@ { "key": "alt+3", "mac": "cmd+3", - "command": "emacs-mcx.universalArgumentDigit", + "command": "emacs-mcx.subsequentArgumentDigit", "when": "emacs-mcx.acceptingArgument && editorTextFocus && config.emacs-mcx.useMetaPrefixMacCmd", "args": [ 3 @@ -394,7 +394,7 @@ }, { "key": "escape 3", - "command": "emacs-mcx.universalArgumentDigit", + "command": "emacs-mcx.subsequentArgumentDigit", "when": "emacs-mcx.acceptingArgument && editorTextFocus && config.emacs-mcx.useMetaPrefixEscape", "args": [ 3 @@ -402,7 +402,7 @@ }, { "key": "ctrl+[ 3", - "command": "emacs-mcx.universalArgumentDigit", + "command": "emacs-mcx.subsequentArgumentDigit", "when": "emacs-mcx.acceptingArgument && editorTextFocus && config.emacs-mcx.useMetaPrefixCtrlLeftBracket", "args": [ 3 @@ -451,7 +451,7 @@ }, { "key": "4", - "command": "emacs-mcx.universalArgumentDigit", + "command": "emacs-mcx.subsequentArgumentDigit", "when": "emacs-mcx.acceptingArgument && editorTextFocus", "args": [ 4 @@ -459,7 +459,7 @@ }, { "key": "alt+4", - "command": "emacs-mcx.universalArgumentDigit", + "command": "emacs-mcx.subsequentArgumentDigit", "when": "emacs-mcx.acceptingArgument && editorTextFocus && !config.emacs-mcx.useMetaPrefixMacCmd", "args": [ 4 @@ -468,7 +468,7 @@ { "key": "alt+4", "mac": "cmd+4", - "command": "emacs-mcx.universalArgumentDigit", + "command": "emacs-mcx.subsequentArgumentDigit", "when": "emacs-mcx.acceptingArgument && editorTextFocus && config.emacs-mcx.useMetaPrefixMacCmd", "args": [ 4 @@ -476,7 +476,7 @@ }, { "key": "escape 4", - "command": "emacs-mcx.universalArgumentDigit", + "command": "emacs-mcx.subsequentArgumentDigit", "when": "emacs-mcx.acceptingArgument && editorTextFocus && config.emacs-mcx.useMetaPrefixEscape", "args": [ 4 @@ -484,7 +484,7 @@ }, { "key": "ctrl+[ 4", - "command": "emacs-mcx.universalArgumentDigit", + "command": "emacs-mcx.subsequentArgumentDigit", "when": "emacs-mcx.acceptingArgument && editorTextFocus && config.emacs-mcx.useMetaPrefixCtrlLeftBracket", "args": [ 4 @@ -533,7 +533,7 @@ }, { "key": "5", - "command": "emacs-mcx.universalArgumentDigit", + "command": "emacs-mcx.subsequentArgumentDigit", "when": "emacs-mcx.acceptingArgument && editorTextFocus", "args": [ 5 @@ -541,7 +541,7 @@ }, { "key": "alt+5", - "command": "emacs-mcx.universalArgumentDigit", + "command": "emacs-mcx.subsequentArgumentDigit", "when": "emacs-mcx.acceptingArgument && editorTextFocus && !config.emacs-mcx.useMetaPrefixMacCmd", "args": [ 5 @@ -550,7 +550,7 @@ { "key": "alt+5", "mac": "cmd+5", - "command": "emacs-mcx.universalArgumentDigit", + "command": "emacs-mcx.subsequentArgumentDigit", "when": "emacs-mcx.acceptingArgument && editorTextFocus && config.emacs-mcx.useMetaPrefixMacCmd", "args": [ 5 @@ -558,7 +558,7 @@ }, { "key": "escape 5", - "command": "emacs-mcx.universalArgumentDigit", + "command": "emacs-mcx.subsequentArgumentDigit", "when": "emacs-mcx.acceptingArgument && editorTextFocus && config.emacs-mcx.useMetaPrefixEscape", "args": [ 5 @@ -566,7 +566,7 @@ }, { "key": "ctrl+[ 5", - "command": "emacs-mcx.universalArgumentDigit", + "command": "emacs-mcx.subsequentArgumentDigit", "when": "emacs-mcx.acceptingArgument && editorTextFocus && config.emacs-mcx.useMetaPrefixCtrlLeftBracket", "args": [ 5 @@ -615,7 +615,7 @@ }, { "key": "6", - "command": "emacs-mcx.universalArgumentDigit", + "command": "emacs-mcx.subsequentArgumentDigit", "when": "emacs-mcx.acceptingArgument && editorTextFocus", "args": [ 6 @@ -623,7 +623,7 @@ }, { "key": "alt+6", - "command": "emacs-mcx.universalArgumentDigit", + "command": "emacs-mcx.subsequentArgumentDigit", "when": "emacs-mcx.acceptingArgument && editorTextFocus && !config.emacs-mcx.useMetaPrefixMacCmd", "args": [ 6 @@ -632,7 +632,7 @@ { "key": "alt+6", "mac": "cmd+6", - "command": "emacs-mcx.universalArgumentDigit", + "command": "emacs-mcx.subsequentArgumentDigit", "when": "emacs-mcx.acceptingArgument && editorTextFocus && config.emacs-mcx.useMetaPrefixMacCmd", "args": [ 6 @@ -640,7 +640,7 @@ }, { "key": "escape 6", - "command": "emacs-mcx.universalArgumentDigit", + "command": "emacs-mcx.subsequentArgumentDigit", "when": "emacs-mcx.acceptingArgument && editorTextFocus && config.emacs-mcx.useMetaPrefixEscape", "args": [ 6 @@ -648,7 +648,7 @@ }, { "key": "ctrl+[ 6", - "command": "emacs-mcx.universalArgumentDigit", + "command": "emacs-mcx.subsequentArgumentDigit", "when": "emacs-mcx.acceptingArgument && editorTextFocus && config.emacs-mcx.useMetaPrefixCtrlLeftBracket", "args": [ 6 @@ -697,7 +697,7 @@ }, { "key": "7", - "command": "emacs-mcx.universalArgumentDigit", + "command": "emacs-mcx.subsequentArgumentDigit", "when": "emacs-mcx.acceptingArgument && editorTextFocus", "args": [ 7 @@ -705,7 +705,7 @@ }, { "key": "alt+7", - "command": "emacs-mcx.universalArgumentDigit", + "command": "emacs-mcx.subsequentArgumentDigit", "when": "emacs-mcx.acceptingArgument && editorTextFocus && !config.emacs-mcx.useMetaPrefixMacCmd", "args": [ 7 @@ -714,7 +714,7 @@ { "key": "alt+7", "mac": "cmd+7", - "command": "emacs-mcx.universalArgumentDigit", + "command": "emacs-mcx.subsequentArgumentDigit", "when": "emacs-mcx.acceptingArgument && editorTextFocus && config.emacs-mcx.useMetaPrefixMacCmd", "args": [ 7 @@ -722,7 +722,7 @@ }, { "key": "escape 7", - "command": "emacs-mcx.universalArgumentDigit", + "command": "emacs-mcx.subsequentArgumentDigit", "when": "emacs-mcx.acceptingArgument && editorTextFocus && config.emacs-mcx.useMetaPrefixEscape", "args": [ 7 @@ -730,7 +730,7 @@ }, { "key": "ctrl+[ 7", - "command": "emacs-mcx.universalArgumentDigit", + "command": "emacs-mcx.subsequentArgumentDigit", "when": "emacs-mcx.acceptingArgument && editorTextFocus && config.emacs-mcx.useMetaPrefixCtrlLeftBracket", "args": [ 7 @@ -779,7 +779,7 @@ }, { "key": "8", - "command": "emacs-mcx.universalArgumentDigit", + "command": "emacs-mcx.subsequentArgumentDigit", "when": "emacs-mcx.acceptingArgument && editorTextFocus", "args": [ 8 @@ -787,7 +787,7 @@ }, { "key": "alt+8", - "command": "emacs-mcx.universalArgumentDigit", + "command": "emacs-mcx.subsequentArgumentDigit", "when": "emacs-mcx.acceptingArgument && editorTextFocus && !config.emacs-mcx.useMetaPrefixMacCmd", "args": [ 8 @@ -796,7 +796,7 @@ { "key": "alt+8", "mac": "cmd+8", - "command": "emacs-mcx.universalArgumentDigit", + "command": "emacs-mcx.subsequentArgumentDigit", "when": "emacs-mcx.acceptingArgument && editorTextFocus && config.emacs-mcx.useMetaPrefixMacCmd", "args": [ 8 @@ -804,7 +804,7 @@ }, { "key": "escape 8", - "command": "emacs-mcx.universalArgumentDigit", + "command": "emacs-mcx.subsequentArgumentDigit", "when": "emacs-mcx.acceptingArgument && editorTextFocus && config.emacs-mcx.useMetaPrefixEscape", "args": [ 8 @@ -812,7 +812,7 @@ }, { "key": "ctrl+[ 8", - "command": "emacs-mcx.universalArgumentDigit", + "command": "emacs-mcx.subsequentArgumentDigit", "when": "emacs-mcx.acceptingArgument && editorTextFocus && config.emacs-mcx.useMetaPrefixCtrlLeftBracket", "args": [ 8 @@ -861,7 +861,7 @@ }, { "key": "9", - "command": "emacs-mcx.universalArgumentDigit", + "command": "emacs-mcx.subsequentArgumentDigit", "when": "emacs-mcx.acceptingArgument && editorTextFocus", "args": [ 9 @@ -869,7 +869,7 @@ }, { "key": "alt+9", - "command": "emacs-mcx.universalArgumentDigit", + "command": "emacs-mcx.subsequentArgumentDigit", "when": "emacs-mcx.acceptingArgument && editorTextFocus && !config.emacs-mcx.useMetaPrefixMacCmd", "args": [ 9 @@ -878,7 +878,7 @@ { "key": "alt+9", "mac": "cmd+9", - "command": "emacs-mcx.universalArgumentDigit", + "command": "emacs-mcx.subsequentArgumentDigit", "when": "emacs-mcx.acceptingArgument && editorTextFocus && config.emacs-mcx.useMetaPrefixMacCmd", "args": [ 9 @@ -886,7 +886,7 @@ }, { "key": "escape 9", - "command": "emacs-mcx.universalArgumentDigit", + "command": "emacs-mcx.subsequentArgumentDigit", "when": "emacs-mcx.acceptingArgument && editorTextFocus && config.emacs-mcx.useMetaPrefixEscape", "args": [ 9 @@ -894,7 +894,7 @@ }, { "key": "ctrl+[ 9", - "command": "emacs-mcx.universalArgumentDigit", + "command": "emacs-mcx.subsequentArgumentDigit", "when": "emacs-mcx.acceptingArgument && editorTextFocus && config.emacs-mcx.useMetaPrefixCtrlLeftBracket", "args": [ 9 diff --git a/src/emulator.ts b/src/emulator.ts index 11fdd7401f..d40e1375ea 100644 --- a/src/emulator.ts +++ b/src/emulator.ts @@ -292,8 +292,8 @@ export class EmacsEmulator implements IEmacsCommandRunner, IMarkModeController, /** * Digits following C-u or M- */ - public universalArgumentDigit(arg: number): Promise { - return this.prefixArgumentHandler.universalArgumentDigit(arg); + public subsequentArgumentDigit(arg: number): Promise { + return this.prefixArgumentHandler.subsequentArgumentDigit(arg); } public onPrefixArgumentChange(newPrefixArgument: number | undefined): Thenable { diff --git a/src/extension.ts b/src/extension.ts index b716620364..6c9b6b366f 100644 --- a/src/extension.ts +++ b/src/extension.ts @@ -82,12 +82,12 @@ export function activate(context: vscode.ExtensionContext): void { ); } - registerEmulatorCommand("emacs-mcx.universalArgumentDigit", (emulator, args) => { + registerEmulatorCommand("emacs-mcx.subsequentArgumentDigit", (emulator, args) => { const arg = args[0]; if (typeof arg !== "number") { return; } - emulator.universalArgumentDigit(arg); + emulator.subsequentArgumentDigit(arg); }); registerEmulatorCommand("emacs-mcx.digitArgument", (emulator, args) => { diff --git a/src/prefix-argument.ts b/src/prefix-argument.ts index a7300a8ca6..72f9489f20 100644 --- a/src/prefix-argument.ts +++ b/src/prefix-argument.ts @@ -56,19 +56,19 @@ export class PrefixArgumentHandler { MessageManager.showMessage(`C-u ${this.state.prefixArgumentStr}-`); } - public universalArgumentDigit(arg: number): Promise { + public subsequentArgumentDigit(arg: number): Promise { if (!this.state.isInPrefixArgumentMode) { - logger.debug(`[PrefixArgumentHandler.universalArgumentDigit]\t Not in prefix argument mode. exit.`); + logger.debug(`[PrefixArgumentHandler.subsequentArgumentDigit]\t Not in prefix argument mode. exit.`); return Promise.resolve(); } if (!this.state.isAcceptingPrefixArgument) { - logger.debug(`[PrefixArgumentHandler.universalArgumentDigit]\t Prefix argument input is not accepted.`); + logger.debug(`[PrefixArgumentHandler.subsequentArgumentDigit]\t Prefix argument input is not accepted.`); return Promise.resolve(); } if (isNaN(arg) || arg < 0) { - logger.debug(`[PrefixArgumentHandler.universalArgumentDigit]\t Input digit is NaN or negative. Ignore it.`); + logger.debug(`[PrefixArgumentHandler.subsequentArgumentDigit]\t Input digit is NaN or negative. Ignore it.`); return Promise.resolve(); } @@ -102,7 +102,7 @@ export class PrefixArgumentHandler { public digitArgument(arg: number): Promise { if (isNaN(arg) || arg < 0) { - logger.debug(`[PrefixArgumentHandler.universalArgumentDigit]\t Input digit is NaN or negative. Ignore it.`); + logger.debug(`[PrefixArgumentHandler.digitArgument]\t Input digit is NaN or negative. Ignore it.`); return Promise.resolve(); } diff --git a/src/test/suite/commands/edit.test.ts b/src/test/suite/commands/edit.test.ts index a68bf7e39a..2320671c08 100644 --- a/src/test/suite/commands/edit.test.ts +++ b/src/test/suite/commands/edit.test.ts @@ -33,7 +33,7 @@ suite("deleteForwardChar", () => { test("it works in multi lines with prefix argument", async () => { setEmptyCursors(activeTextEditor, [1, 5]); await emulator.universalArgument(); - await emulator.universalArgumentDigit(8); + await emulator.subsequentArgumentDigit(8); await emulator.runCommand("deleteForwardChar"); assertTextEqual(activeTextEditor, "0123456789\nabcdeCDEFGHIJ"); }); @@ -77,7 +77,7 @@ suite("deleteBackwardChar", () => { test("it works in multi lines with prefix argument", async () => { setEmptyCursors(activeTextEditor, [1, 5]); await emulator.universalArgument(); - await emulator.universalArgumentDigit(8); + await emulator.subsequentArgumentDigit(8); await emulator.runCommand("deleteBackwardChar"); assertTextEqual(activeTextEditor, "01234567fghij\nABCDEFGHIJ"); }); diff --git a/src/test/suite/commands/kill-yank/kill-line.test.ts b/src/test/suite/commands/kill-yank/kill-line.test.ts index 9f836b28f1..a60df34ee5 100644 --- a/src/test/suite/commands/kill-yank/kill-line.test.ts +++ b/src/test/suite/commands/kill-yank/kill-line.test.ts @@ -211,7 +211,7 @@ abcdefghij setEmptyCursors(activeTextEditor, [0, 0]); emulator.universalArgument(); - await emulator.universalArgumentDigit(2); + await emulator.subsequentArgumentDigit(2); await emulator.runCommand("killLine"); @@ -234,7 +234,7 @@ abcdefghij setEmptyCursors(activeTextEditor, [0, 1]); emulator.universalArgument(); - await emulator.universalArgumentDigit(2); + await emulator.subsequentArgumentDigit(2); await emulator.runCommand("killLine"); @@ -327,7 +327,7 @@ ABCDEFGHIJ` setEmptyCursors(activeTextEditor, [0, 0]); emulator.universalArgument(); - await emulator.universalArgumentDigit(2); + await emulator.subsequentArgumentDigit(2); await emulator.runCommand("killLine"); @@ -350,7 +350,7 @@ abcdefghij setEmptyCursors(activeTextEditor, [0, 1]); emulator.universalArgument(); - await emulator.universalArgumentDigit(2); + await emulator.subsequentArgumentDigit(2); await emulator.runCommand("killLine"); diff --git a/src/test/suite/commands/move.test.ts b/src/test/suite/commands/move.test.ts index 487dd790bf..59dc44961a 100644 --- a/src/test/suite/commands/move.test.ts +++ b/src/test/suite/commands/move.test.ts @@ -135,7 +135,7 @@ suite("scroll-up/down-command", () => { setEmptyCursors(activeTextEditor, [0, 0]); // The first line emulator.universalArgument(); - await emulator.universalArgumentDigit(2); + await emulator.subsequentArgumentDigit(2); await emulator.runCommand("scrollUpCommand"); assertCursorsEqual(activeTextEditor, [2, 0]); // 2 lines down @@ -156,7 +156,7 @@ suite("scroll-up/down-command", () => { setEmptyCursors(activeTextEditor, [10, 0]); emulator.universalArgument(); - await emulator.universalArgumentDigit(2); + await emulator.subsequentArgumentDigit(2); await emulator.runCommand("scrollDownCommand"); assertCursorsEqual(activeTextEditor, [8, 0]); // 2 lines up diff --git a/src/test/suite/commands/paredit.test.ts b/src/test/suite/commands/paredit.test.ts index 654fe8f365..19756b1d6d 100644 --- a/src/test/suite/commands/paredit.test.ts +++ b/src/test/suite/commands/paredit.test.ts @@ -143,7 +143,7 @@ suite("paredit.kill-sexp", () => { setEmptyCursors(activeTextEditor, [1, 0]); emulator.universalArgument(); - await emulator.universalArgumentDigit(2); + await emulator.subsequentArgumentDigit(2); await emulator.runCommand("paredit.killSexp"); assertTextEqual( @@ -248,7 +248,7 @@ suite("paredit.backward-kill-sexp", () => { setEmptyCursors(activeTextEditor, [6, 3]); emulator.universalArgument(); - await emulator.universalArgumentDigit(2); + await emulator.subsequentArgumentDigit(2); await emulator.runCommand("paredit.backwardKillSexp"); assertTextEqual( @@ -339,7 +339,7 @@ suite("paredit.mark-sexp", () => { emulator.pushMark(activeTextEditor.selections.map((s) => s.active)); emulator.universalArgument(); - await emulator.universalArgumentDigit(2); + await emulator.subsequentArgumentDigit(2); await emulator.runCommand("paredit.markSexp"); assertTextEqual(activeTextEditor, initialText); @@ -411,7 +411,7 @@ suite("paredit commands with prefix argument", () => { setEmptyCursors(activeTextEditor, [0, 2]); // the right to `0` emulator.universalArgument(); - await emulator.universalArgumentDigit(2); + await emulator.subsequentArgumentDigit(2); await emulator.runCommand("paredit.forwardSexp"); assert.strictEqual(activeTextEditor.selections.length, 1); @@ -422,7 +422,7 @@ suite("paredit commands with prefix argument", () => { setEmptyCursors(activeTextEditor, [0, 19]); // the left to `9` emulator.universalArgument(); - await emulator.universalArgumentDigit(2); + await emulator.subsequentArgumentDigit(2); await emulator.runCommand("paredit.backwardSexp"); assert.strictEqual(activeTextEditor.selections.length, 1); diff --git a/src/test/suite/prefix-arguments/digit-argument.test.ts b/src/test/suite/prefix-arguments/digit-argument.test.ts index 68893f3c86..0a7aa6f27d 100644 --- a/src/test/suite/prefix-arguments/digit-argument.test.ts +++ b/src/test/suite/prefix-arguments/digit-argument.test.ts @@ -56,7 +56,7 @@ suite("Digit argument (M-)", () => { assertPrefixArgumentContext(3); resetExecuteCommandSpy(); - await emulator.universalArgumentDigit(2); + await emulator.subsequentArgumentDigit(2); assertPrefixArgumentContext(32); resetExecuteCommandSpy(); @@ -86,11 +86,11 @@ suite("Digit argument (M-)", () => { assertPrefixArgumentContext(3); resetExecuteCommandSpy(); - await emulator.universalArgumentDigit(1); + await emulator.subsequentArgumentDigit(1); assertPrefixArgumentContext(31); resetExecuteCommandSpy(); - await emulator.universalArgumentDigit(2); + await emulator.subsequentArgumentDigit(2); assertPrefixArgumentContext(312); resetExecuteCommandSpy(); diff --git a/src/test/suite/prefix-arguments/universal-argument.test.ts b/src/test/suite/prefix-arguments/universal-argument.test.ts index e022d6f50f..dc518706f8 100644 --- a/src/test/suite/prefix-arguments/universal-argument.test.ts +++ b/src/test/suite/prefix-arguments/universal-argument.test.ts @@ -56,7 +56,7 @@ suite("Universal argument (C-u)", () => { assertPrefixArgumentContext(4); resetExecuteCommandSpy(); - await emulator.universalArgumentDigit(2); + await emulator.subsequentArgumentDigit(2); assertPrefixArgumentContext(2); resetExecuteCommandSpy(); @@ -73,7 +73,7 @@ suite("Universal argument (C-u)", () => { assertPrefixArgumentContext(4); resetExecuteCommandSpy(); - await emulator.universalArgumentDigit(0); + await emulator.subsequentArgumentDigit(0); assertPrefixArgumentContext(0); resetExecuteCommandSpy(); @@ -90,11 +90,11 @@ suite("Universal argument (C-u)", () => { assertPrefixArgumentContext(4); resetExecuteCommandSpy(); - await emulator.universalArgumentDigit(0); + await emulator.subsequentArgumentDigit(0); assertPrefixArgumentContext(0); resetExecuteCommandSpy(); - await emulator.universalArgumentDigit(2); + await emulator.subsequentArgumentDigit(2); assertPrefixArgumentContext(2); await emulator.typeChar("a"); @@ -110,11 +110,11 @@ suite("Universal argument (C-u)", () => { assertPrefixArgumentContext(4); resetExecuteCommandSpy(); - await emulator.universalArgumentDigit(1); + await emulator.subsequentArgumentDigit(1); assertPrefixArgumentContext(1); resetExecuteCommandSpy(); - await emulator.universalArgumentDigit(2); + await emulator.subsequentArgumentDigit(2); assertPrefixArgumentContext(12); resetExecuteCommandSpy(); @@ -161,11 +161,11 @@ suite("Universal argument (C-u)", () => { assertPrefixArgumentContext(4); resetExecuteCommandSpy(); - await emulator.universalArgumentDigit(1); + await emulator.subsequentArgumentDigit(1); assertPrefixArgumentContext(1); resetExecuteCommandSpy(); - await emulator.universalArgumentDigit(2); + await emulator.subsequentArgumentDigit(2); assertPrefixArgumentContext(12); resetExecuteCommandSpy(); @@ -189,7 +189,7 @@ suite("Universal argument (C-u)", () => { assertPrefixArgumentContext(64); resetExecuteCommandSpy(); - await emulator.universalArgumentDigit(3); + await emulator.subsequentArgumentDigit(3); assertPrefixArgumentContext(3); resetExecuteCommandSpy(); @@ -213,7 +213,7 @@ suite("Universal argument (C-u)", () => { resetExecuteCommandSpy(); emulator.universalArgument(); - await emulator.universalArgumentDigit(3); + await emulator.subsequentArgumentDigit(3); await emulator.runCommand("forwardChar"); assertCursorsEqual(activeTextEditor, [0, 3]); @@ -228,7 +228,7 @@ suite("Universal argument (C-u)", () => { resetExecuteCommandSpy(); emulator.universalArgument(); - await emulator.universalArgumentDigit(0); + await emulator.subsequentArgumentDigit(0); await emulator.runCommand("forwardChar"); assertCursorsEqual(activeTextEditor, [0, 0]); @@ -243,8 +243,8 @@ suite("Universal argument (C-u)", () => { resetExecuteCommandSpy(); emulator.universalArgument(); - await emulator.universalArgumentDigit(0); - await emulator.universalArgumentDigit(3); + await emulator.subsequentArgumentDigit(0); + await emulator.subsequentArgumentDigit(3); await emulator.runCommand("forwardChar"); assertCursorsEqual(activeTextEditor, [0, 3]); @@ -259,8 +259,8 @@ suite("Universal argument (C-u)", () => { resetExecuteCommandSpy(); emulator.universalArgument(); - await emulator.universalArgumentDigit(1); - await emulator.universalArgumentDigit(2); + await emulator.subsequentArgumentDigit(1); + await emulator.subsequentArgumentDigit(2); await emulator.runCommand("forwardChar"); assertCursorsEqual(activeTextEditor, [0, 12]); @@ -305,8 +305,8 @@ suite("Universal argument (C-u)", () => { resetExecuteCommandSpy(); emulator.universalArgument(); assertAcceptingArgumentContext(true); - await emulator.universalArgumentDigit(1); - await emulator.universalArgumentDigit(2); + await emulator.subsequentArgumentDigit(1); + await emulator.subsequentArgumentDigit(2); emulator.universalArgument(); assertAcceptingArgumentContext(false); @@ -327,7 +327,7 @@ suite("Universal argument (C-u)", () => { emulator.universalArgument(); emulator.universalArgument(); emulator.universalArgument(); - await emulator.universalArgumentDigit(3); + await emulator.subsequentArgumentDigit(3); await emulator.runCommand("forwardChar"); assertCursorsEqual(activeTextEditor, [0, 3]); @@ -342,7 +342,7 @@ suite("Universal argument (C-u)", () => { resetExecuteCommandSpy(); emulator.universalArgument(); - await emulator.universalArgumentDigit(3); + await emulator.subsequentArgumentDigit(3); await emulator.runCommand("forwardChar"); assertCursorsEqual(activeTextEditor, [0, 3], [1, 3]);