Skip to content

Commit

Permalink
Fix linter errors.
Browse files Browse the repository at this point in the history
  • Loading branch information
tienshiao committed Feb 29, 2016
1 parent 2daac48 commit 2716820
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/motion/position.ts
Original file line number Diff line number Diff line change
Expand Up @@ -263,7 +263,7 @@ export class Position extends vscode.Position {
private getWordLeftWithRegex(regex: RegExp) : Position {
for (let currentLine = this.line; currentLine >= 0; currentLine--) {
let positions = this.getAllPositions(TextEditor.getLineAt(new vscode.Position(currentLine, 0)).text, regex);
let newCharacter = _.find(positions.reverse(), index => index < this.character || currentLine != this.line);
let newCharacter = _.find(positions.reverse(), index => index < this.character || currentLine !== this.line);

if (newCharacter !== undefined) {
return new Position(currentLine, newCharacter, this.positionOptions);
Expand All @@ -276,7 +276,7 @@ export class Position extends vscode.Position {
private getWordRightWithRegex(regex: RegExp): Position {
for (let currentLine = this.line; currentLine < TextEditor.getLineCount(); currentLine++) {
let positions = this.getAllPositions(TextEditor.getLineAt(new vscode.Position(currentLine, 0)).text, regex);
let newCharacter = _.find(positions, index => index > this.character || currentLine != this.line);
let newCharacter = _.find(positions, index => index > this.character || currentLine !== this.line);

if (newCharacter !== undefined) {
return new Position(currentLine, newCharacter, this.positionOptions);
Expand All @@ -289,7 +289,7 @@ export class Position extends vscode.Position {
private getCurrentWordEndWithRegex(regex: RegExp) : Position {
for (let currentLine = this.line; currentLine < TextEditor.getLineCount(); currentLine++) {
let positions = this.getAllEndPositions(TextEditor.getLineAt(new vscode.Position(currentLine, 0)).text, regex);
let newCharacter = _.find(positions, index => index > this.character || currentLine != this.line);
let newCharacter = _.find(positions, index => index > this.character || currentLine !== this.line);

if (newCharacter !== undefined) {
return new Position(currentLine, newCharacter, this.positionOptions);
Expand Down

0 comments on commit 2716820

Please sign in to comment.