This commit is contained in:
xconverge 2018-07-18 20:06:09 -07:00
parent ba514a24fe
commit f29b8ba8bf
2 changed files with 16 additions and 0 deletions

View File

@ -541,6 +541,7 @@ class MoveDownNonBlank extends BaseMovement {
vimState: VimState,
count: number
): Promise<Position | IMovement> {
vimState.currentRegisterMode = RegisterMode.LineWise;
return position.getDownByCount(Math.max(count, 1)).getFirstLineNonBlankChar();
}
}
@ -554,6 +555,7 @@ class MoveUpNonBlank extends BaseMovement {
vimState: VimState,
count: number
): Promise<Position | IMovement> {
vimState.currentRegisterMode = RegisterMode.LineWise;
return position.getUpByCount(Math.max(count, 1)).getFirstLineNonBlankChar();
}
}

View File

@ -1479,6 +1479,20 @@ suite('Mode Normal', () => {
end: ['|three'],
});
newTest({
title: 'can delete with + motion and count',
start: ['one', 'two', 'three', 'fo|ur', 'five', 'six', 'seven'],
keysPressed: 'd2+',
end: ['one', 'two', 'three', '|seven'],
});
newTest({
title: 'can delete with - motion and count',
start: ['one', 'two', 'three', 'four', 'five', 's|ix', 'seven'],
keysPressed: 'd3-',
end: ['one', 'two', '|seven'],
});
newTest({
title: 'can dE correctly',
start: ['|one two three'],