fix(prettier)

This commit is contained in:
Jason Poon 2017-12-25 21:33:09 +11:00 committed by Jason Poon
parent bde06befad
commit 68b45a05e7
4 changed files with 19 additions and 10 deletions

View File

@ -7,7 +7,6 @@ import { StatusBar } from '../statusBar';
import * as parser from './parser';
export class CommandLine {
public static async PromptAndRun(initialText: string, vimState: VimState): Promise<void> {
if (!vscode.window.activeTextEditor) {
console.log('CommandLine: No active document.');
@ -15,8 +14,9 @@ export class CommandLine {
}
try {
let cmdString = await vscode.window.showInputBox(this.getInputBoxOptions(initialText)) || '';
if (cmdString && cmdString[0] === ":" && Configuration.cmdLineInitialColon) {
let cmdString =
(await vscode.window.showInputBox(this.getInputBoxOptions(initialText))) || '';
if (cmdString && cmdString[0] === ':' && Configuration.cmdLineInitialColon) {
cmdString = cmdString.slice(1);
}

View File

@ -222,7 +222,12 @@ export class HistoryTracker {
}
private _getDocumentText(): string {
return (this.vimState.editor && this.vimState.editor.document && this.vimState.editor.document.getText()) || '';
return (
(this.vimState.editor &&
this.vimState.editor.document &&
this.vimState.editor.document.getText()) ||
''
);
}
private _addNewHistoryStep(): void {

View File

@ -8,7 +8,11 @@ import { Globals } from '../globals';
import { StatusBar } from '../statusBar';
import { allowVSCodeToPropagateCursorUpdatesAndReturnThem } from '../util';
import { Actions, BaseAction, KeypressState } from './../actions/base';
import { BaseCommand, CommandQuitRecordMacro, DocumentContentChangeAction } from './../actions/commands/actions';
import {
BaseCommand,
CommandQuitRecordMacro,
DocumentContentChangeAction,
} from './../actions/commands/actions';
import { CommandInsertInInsertMode, CommandInsertPreviousText } from './../actions/commands/insert';
import { BaseMovement, isIMovement } from './../actions/motion';
import { PairMatcher } from './../common/matching/matcher';

View File

@ -13,11 +13,11 @@ import { assertEqualLines } from './testUtils';
export function getTestingFunctions() {
const getNiceStack = (stack: string | undefined): string => {
return stack
? stack
.split('\n')
.splice(2, 1)
.join('\n')
: 'no stack available :(';
? stack
.split('\n')
.splice(2, 1)
.join('\n')
: 'no stack available :(';
};
const newTest = (testObj: ITestObject): void => {