Run prettier

This commit is contained in:
Jason Fields 2021-04-08 18:42:22 -04:00
parent 9e50e0dc52
commit 3355569e96
4 changed files with 10 additions and 20 deletions

View File

@ -3066,10 +3066,8 @@ class ActionOverrideCmdDInsert extends BaseCommand {
// that our selection is actually over what our original word is
const matchWordPos = vimState.editor.selections[0].active;
const matchWordLength =
matchWordPos
.getLeft()
.nextWordEnd(vimState.document, { inclusive: true })
.getRight().character - matchWordPos.prevWordStart(vimState.document).character;
matchWordPos.getLeft().nextWordEnd(vimState.document, { inclusive: true }).getRight()
.character - matchWordPos.prevWordStart(vimState.document).character;
const wordBegin = curPos.getLeft(matchWordLength);
return new vscode.Selection(wordBegin, curPos);
}

View File

@ -41,9 +41,7 @@ class MoveCamelCaseWordBegin extends CamelCaseBaseMovement {
// TODO use execForOperator? Or maybe dont?
// See note for w
return position
.nextWordEnd(vimState.document, { wordType: WordType.CamelCase })
.getRight();
return position.nextWordEnd(vimState.document, { wordType: WordType.CamelCase }).getRight();
} else {
return position.nextWordStart(vimState.document, { wordType: WordType.CamelCase });
}
@ -88,9 +86,7 @@ class SelectInnerCamelCaseWord extends CamelCaseTextObjectMovement {
const currentChar = vimState.document.lineAt(position).text[position.character];
if (/\s/.test(currentChar)) {
start = position
.prevWordEnd(vimState.document, { wordType: WordType.CamelCase })
.getRight();
start = position.prevWordEnd(vimState.document, { wordType: WordType.CamelCase }).getRight();
stop = position
.nextWordStart(vimState.document, { wordType: WordType.CamelCase })
.getLeftThroughLineBreaks();

View File

@ -415,12 +415,7 @@ Position.prototype.nextWordEnd = function (
document: vscode.TextDocument,
args?: { wordType?: WordType; inclusive?: boolean }
): Position {
return nextWordEnd(
document,
this,
args?.wordType ?? WordType.Normal,
args?.inclusive ?? false
);
return nextWordEnd(document, this, args?.wordType ?? WordType.Normal, args?.inclusive ?? false);
};
Position.prototype.getSentenceBegin = function (

View File

@ -118,9 +118,7 @@ export class SelectABigWord extends TextObjectMovement {
(nextWord.line > position.line || nextWord.isAtDocumentEnd()) &&
vimState.recordedState.count === 0
) {
if (
position.prevWordEnd(vimState.document, { wordType: WordType.Big }).isLineBeginning()
) {
if (position.prevWordEnd(vimState.document, { wordType: WordType.Big }).isLineBeginning()) {
start = position.prevWordEnd(vimState.document, { wordType: WordType.Big });
} else {
start = position.prevWordEnd(vimState.document, { wordType: WordType.Big }).getRight();
@ -324,7 +322,10 @@ export class SelectInnerBigWord extends TextObjectMovement {
start = position.prevWordEnd(vimState.document, { wordType: WordType.Big }).getRight();
stop = position.nextWordStart(vimState.document, { wordType: WordType.Big }).getLeft();
} else {
start = position.prevWordStart(vimState.document, { wordType: WordType.Big, inclusive: true });
start = position.prevWordStart(vimState.document, {
wordType: WordType.Big,
inclusive: true,
});
stop = position.nextWordEnd(vimState.document, {
wordType: WordType.Big,
inclusive: true,