Fix a bunch more tests.

This commit is contained in:
johnfn 2016-09-15 13:42:00 -07:00
parent 11d621478c
commit 227882d492
2 changed files with 7 additions and 2 deletions

View File

@ -1187,14 +1187,14 @@ suite("Mode Normal", () => {
newTest({
title: "/ does not affect mark",
start: ["|one", "twooo", "thurr"],
keysPressed: "ma/two<enter>'a",
keysPressed: "ma/two\n'a",
end: ["|one", "twooo", "thurr"]
});
newTest({
title: "/ can search with regex",
start: ["|", "one two2o"],
keysPressed: "/o\\do",
keysPressed: "/o\\do\n",
end: ["", "one tw|o2o"]
});

View File

@ -1,6 +1,7 @@
import * as assert from 'assert';
import * as vscode from 'vscode';
import { ModeName } from '../src/mode/mode';
import { HistoryTracker } from '../src/history/historyTracker';
import { Position } from '../src/motion/position';
import { ModeHandler } from '../src/mode/modeHandler';
import { TextEditor } from '../src/textEditor';
@ -205,6 +206,10 @@ async function testIt(modeHandler: ModeHandler, testObj: ITestObject): Promise<v
await waitForCursorUpdatesToHappen();
modeHandler.vimState.historyTracker = new HistoryTracker();
modeHandler.vimState.historyTracker.addChange();
modeHandler.vimState.historyTracker.finishCurrentStep();
// move cursor to start position using 'hjkl'
await modeHandler.handleMultipleKeyEvents(helper.getKeyPressesToMoveToStartPosition());