mirror of
https://github.com/VSCodeVim/Vim.git
synced 2024-09-11 12:25:59 +03:00
Updated packages and re-ran prettier
This commit is contained in:
parent
19be4fedd8
commit
dbe22d05af
5889
package-lock.json
generated
Normal file
5889
package-lock.json
generated
Normal file
File diff suppressed because it is too large
Load Diff
@ -550,7 +550,7 @@
|
||||
"diff-match-patch": "^1.0.0",
|
||||
"lodash": "^4.12.0",
|
||||
"neovim-client": "^2.1.0",
|
||||
"prettier": "^1.5.2",
|
||||
"prettier": "^1.6.1",
|
||||
"promised-neovim-client": "^2.0.2",
|
||||
"untildify": "^3.0.2"
|
||||
},
|
||||
|
@ -1909,7 +1909,10 @@ class CommandChangeToLineEnd extends BaseCommand {
|
||||
return new operator.ChangeOperator().run(
|
||||
vimState,
|
||||
position,
|
||||
position.getDownByCount(Math.max(0, count - 1)).getLineEnd().getLeft()
|
||||
position
|
||||
.getDownByCount(Math.max(0, count - 1))
|
||||
.getLineEnd()
|
||||
.getLeft()
|
||||
);
|
||||
}
|
||||
}
|
||||
@ -1922,7 +1925,10 @@ class CommandClearLine extends BaseCommand {
|
||||
|
||||
public async exec(position: Position, vimState: VimState): Promise<VimState> {
|
||||
let count = vimState.recordedState.count || 1;
|
||||
let end = position.getDownByCount(Math.max(0, count - 1)).getLineEnd().getLeft();
|
||||
let end = position
|
||||
.getDownByCount(Math.max(0, count - 1))
|
||||
.getLineEnd()
|
||||
.getLeft();
|
||||
return new operator.ChangeOperator().run(
|
||||
vimState,
|
||||
position.getLineBeginRespectingIndent(),
|
||||
@ -2737,7 +2743,10 @@ class ActionJoinNoWhitespace extends BaseCommand {
|
||||
vimState,
|
||||
position.getLineBegin(),
|
||||
lineTwo.length > 0
|
||||
? position.getNextLineBegin().getLineEnd().getLeft()
|
||||
? position
|
||||
.getNextLineBegin()
|
||||
.getLineEnd()
|
||||
.getLeft()
|
||||
: position.getLineEnd()
|
||||
);
|
||||
|
||||
@ -3393,7 +3402,10 @@ class ActionOverrideCmdDInsert extends BaseCommand {
|
||||
if (idx === 0) {
|
||||
return new vscode.Selection(
|
||||
curPos.getWordLeft(false),
|
||||
curPos.getLeft().getCurrentWordEnd(true).getRight()
|
||||
curPos
|
||||
.getLeft()
|
||||
.getCurrentWordEnd(true)
|
||||
.getRight()
|
||||
);
|
||||
} else {
|
||||
// Since we're adding the selections ourselves, we need to make sure
|
||||
@ -3402,8 +3414,10 @@ class ActionOverrideCmdDInsert extends BaseCommand {
|
||||
vscode.window.activeTextEditor!.selections[0].active
|
||||
);
|
||||
const matchWordLength =
|
||||
matchWordPos.getLeft().getCurrentWordEnd(true).getRight().character -
|
||||
matchWordPos.getWordLeft(false).character;
|
||||
matchWordPos
|
||||
.getLeft()
|
||||
.getCurrentWordEnd(true)
|
||||
.getRight().character - matchWordPos.getWordLeft(false).character;
|
||||
const wordBegin = curPos.getLeftByCount(matchWordLength);
|
||||
return new vscode.Selection(wordBegin, curPos);
|
||||
}
|
||||
|
@ -115,7 +115,10 @@ class CommandSurroundModeRepeat extends BaseMovement {
|
||||
public async execAction(position: Position, vimState: VimState): Promise<IMovement> {
|
||||
return {
|
||||
start: position.getLineBeginRespectingIndent(),
|
||||
stop: position.getLineEnd().getLastWordEnd().getRight(),
|
||||
stop: position
|
||||
.getLineEnd()
|
||||
.getLastWordEnd()
|
||||
.getRight(),
|
||||
};
|
||||
}
|
||||
|
||||
|
@ -403,7 +403,9 @@ export class Position extends vscode.Position {
|
||||
if (includeEol) {
|
||||
return this.getUp(0).getLineEnd();
|
||||
} else {
|
||||
return this.getUp(0).getLineEnd().getLeft();
|
||||
return this.getUp(0)
|
||||
.getLineEnd()
|
||||
.getLeft();
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -48,13 +48,11 @@ class Remapper {
|
||||
remapping.after.forEach(item => after.push(AngleBracketNotation.Normalize(item)));
|
||||
}
|
||||
|
||||
this._remappings.push(
|
||||
<IKeybinding>{
|
||||
before: before,
|
||||
after: after,
|
||||
commands: remapping.commands,
|
||||
}
|
||||
);
|
||||
this._remappings.push(<IKeybinding>{
|
||||
before: before,
|
||||
after: after,
|
||||
commands: remapping.commands,
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -13,7 +13,12 @@ import { getAndUpdateModeHandler } from '../extension';
|
||||
export function getTestingFunctions() {
|
||||
const newTest = (testObj: ITestObject): void => {
|
||||
const stack = new Error().stack;
|
||||
let niceStack = stack ? stack.split('\n').splice(2, 1).join('\n') : 'no stack available :(';
|
||||
let niceStack = stack
|
||||
? stack
|
||||
.split('\n')
|
||||
.splice(2, 1)
|
||||
.join('\n')
|
||||
: 'no stack available :(';
|
||||
|
||||
test(testObj.title, async () =>
|
||||
testIt.bind(null, await getAndUpdateModeHandler())(testObj).catch((reason: Error) => {
|
||||
@ -26,7 +31,12 @@ export function getTestingFunctions() {
|
||||
const newTestOnly = (testObj: ITestObject): void => {
|
||||
console.log('!!! Running single test !!!');
|
||||
const stack = new Error().stack;
|
||||
let niceStack = stack ? stack.split('\n').splice(2, 1).join('\n') : 'no stack available :(';
|
||||
let niceStack = stack
|
||||
? stack
|
||||
.split('\n')
|
||||
.splice(2, 1)
|
||||
.join('\n')
|
||||
: 'no stack available :(';
|
||||
|
||||
test.only(testObj.title, async () =>
|
||||
testIt.bind(null, await getAndUpdateModeHandler())(testObj).catch((reason: Error) => {
|
||||
|
@ -7,7 +7,10 @@ import * as fs from 'fs';
|
||||
import { Configuration } from '../src/configuration/configuration';
|
||||
|
||||
function rndName() {
|
||||
return Math.random().toString(36).replace(/[^a-z]+/g, '').substr(0, 10);
|
||||
return Math.random()
|
||||
.toString(36)
|
||||
.replace(/[^a-z]+/g, '')
|
||||
.substr(0, 10);
|
||||
}
|
||||
|
||||
async function createRandomFile(contents: string, fileExtension: string): Promise<vscode.Uri> {
|
||||
|
Loading…
Reference in New Issue
Block a user