mirror of
https://github.com/VSCodeVim/Vim.git
synced 2024-11-10 00:59:44 +03:00
Make tslint happy
This commit is contained in:
parent
33e28c4c33
commit
5f4d58da26
@ -501,8 +501,10 @@ export class Position extends vscode.Position {
|
||||
for (let currentLine = this.line; currentLine >= paragraphBegin.line; currentLine--) {
|
||||
let endPositions = this.getAllEndPositions(TextEditor.getLineAt(new vscode.Position(currentLine, 0)).text, regex);
|
||||
let newCharacter = _.find(endPositions.reverse(),
|
||||
index => ((index < this.character && !inclusive && new Position(currentLine, index).getRightThroughLineBreaks().compareTo(this)) ||
|
||||
(index <= this.character && inclusive)) || currentLine !== this.line)
|
||||
index => ((index < this.character && !inclusive
|
||||
&& new Position(currentLine, index).getRightThroughLineBreaks().compareTo(this))
|
||||
|| (index <= this.character && inclusive)
|
||||
) || currentLine !== this.line);
|
||||
|
||||
if (newCharacter !== undefined) {
|
||||
return new Position(currentLine, newCharacter).getRightThroughLineBreaks();
|
||||
@ -511,8 +513,7 @@ export class Position extends vscode.Position {
|
||||
|
||||
if ((paragraphBegin.line + 1 === this.line || paragraphBegin.line === this.line)) {
|
||||
return paragraphBegin;
|
||||
}
|
||||
else {
|
||||
} else {
|
||||
return new Position(paragraphBegin.line + 1, 0);
|
||||
}
|
||||
}
|
||||
|
@ -420,7 +420,7 @@ suite("sentence motion", () => {
|
||||
let motion = new Position(0, 35).getPreviousSentenceBegin();
|
||||
assert.equal(motion.line, 0);
|
||||
assert.equal(motion.character, 0);
|
||||
})
|
||||
});
|
||||
|
||||
test("current sentence begin with no concrete sentense inside", () => {
|
||||
let motion = new Position(3, 0).getPreviousSentenceBegin();
|
||||
|
Loading…
Reference in New Issue
Block a user