mirror of
https://github.com/VSCodeVim/Vim.git
synced 2024-09-19 08:07:28 +03:00
commit
08dd7c16d6
@ -2427,6 +2427,10 @@ class CommandDeleteToLineEnd extends BaseCommand {
|
||||
canBeRepeatedWithDot = true;
|
||||
|
||||
public async exec(position: Position, vimState: VimState): Promise<VimState> {
|
||||
if (position.isLineEnd()) {
|
||||
return vimState;
|
||||
}
|
||||
|
||||
return await new DeleteOperator().run(vimState, position, position.getLineEnd().getLeft());
|
||||
}
|
||||
}
|
||||
|
@ -105,6 +105,13 @@ suite("Mode Normal", () => {
|
||||
end: ['t|e'],
|
||||
});
|
||||
|
||||
newTest({
|
||||
title: "Can handle 'D' on empty lines",
|
||||
start: ['text', '|', 'text'],
|
||||
keysPressed: 'D',
|
||||
end: ['text', '|', 'text']
|
||||
});
|
||||
|
||||
newTest({
|
||||
title: "Can handle 'DD'",
|
||||
start: ['tex|t'],
|
||||
|
Loading…
Reference in New Issue
Block a user