diff --git a/src/Motions/Match.ts b/src/Motions/Match.ts index 6039c3aa..e727b4b6 100644 --- a/src/Motions/Match.ts +++ b/src/Motions/Match.ts @@ -44,10 +44,6 @@ export class MotionMatch extends Motion { return obj; } - static clearLast() { - MotionMatch.last = undefined; - } - static repeatLast(args: { isReverse?: boolean; n?: number }): Motion { return MotionMatch.last ? MotionMatch.last.clone(args) : new MotionEmpty(); } diff --git a/test/ModeNormal/comma.test.ts b/test/ModeNormal/comma.test.ts index 60b03ea9..3cfc9d4f 100644 --- a/test/ModeNormal/comma.test.ts +++ b/test/ModeNormal/comma.test.ts @@ -1,14 +1,17 @@ import * as BlackBox from '../Framework/BlackBox'; -import { MotionMatch } from '../../src/Motions/Match'; suite('Normal: ,', () => { - MotionMatch.clearLast(); - const testCases: BlackBox.TestCase[] = [ - // Empty + // Empty - can only be tested in a fresh document + //{ + // from: 'Foo aaa bbb ccc e[]nd\nBar end', + // inputs: ',', + // to: 'Foo aaa bbb ccc e[]nd\nBar end', + //}, + // Empty - after no match { from: 'Foo aaa bbb ccc e[]nd\nBar end', - inputs: ',', + inputs: 'f X ,', to: 'Foo aaa bbb ccc e[]nd\nBar end', }, // f diff --git a/test/ModeNormal/semicolon.test.ts b/test/ModeNormal/semicolon.test.ts index 0b05eb5a..521f2d36 100644 --- a/test/ModeNormal/semicolon.test.ts +++ b/test/ModeNormal/semicolon.test.ts @@ -1,14 +1,17 @@ import * as BlackBox from '../Framework/BlackBox'; -import { MotionMatch } from '../../src/Motions/Match'; suite('Normal: ;', () => { - MotionMatch.clearLast(); - const testCases: BlackBox.TestCase[] = [ - // Empty + // Empty - can only be tested in a fresh document + //{ + // from: '[]Foo aaa bbb ccc end\nBar end', + // inputs: ';', + // to: '[]Foo aaa bbb ccc end\nBar end', + //}, + // Empty - after no match { from: '[]Foo aaa bbb ccc end\nBar end', - inputs: ';', + inputs: 'f X ;', to: '[]Foo aaa bbb ccc end\nBar end', }, // f