_ when used with operator should be linewise

So `d_` is the same as `dd`, `y_` is the same as `yy`, etc.
Fixes #6435
This commit is contained in:
Jason Fields 2021-04-06 23:45:08 -04:00
parent 057cfc58ed
commit 15abffb2b8

View File

@ -731,10 +731,11 @@ class MoveDownUnderscore extends BaseMovement {
vimState: VimState,
count: number
): Promise<Position | IMovement> {
return TextEditor.getFirstNonWhitespaceCharOnLine(
vimState.document,
position.getDown(Math.max(count - 1, 0)).line
);
vimState.currentRegisterMode = RegisterMode.LineWise;
const pos = position.getDown(Math.max(count - 1, 0));
return vimState.recordedState.operator
? pos
: TextEditor.getFirstNonWhitespaceCharOnLine(vimState.document, pos.line);
}
}