mirror of
https://github.com/VSCodeVim/Vim.git
synced 2024-09-20 00:27:41 +03:00
Implement <count>yy
This commit is contained in:
parent
a8f5457235
commit
433ba199a5
@ -1714,10 +1714,10 @@ class MoveYY extends BaseMovement {
|
||||
modes = [ModeName.Normal];
|
||||
keys = ["y"];
|
||||
|
||||
public async execAction(position: Position, vimState: VimState): Promise<IMovement> {
|
||||
public async execActionWithCount(position: Position, vimState: VimState, count: number): Promise<IMovement> {
|
||||
return {
|
||||
start : position.getLineBegin(),
|
||||
stop : position.getLineEndIncludingEOL(),
|
||||
stop : position.getDownByCount(Math.max(0, count - 1)).getLineEnd(),
|
||||
registerMode: RegisterMode.LineWise,
|
||||
};
|
||||
}
|
||||
|
@ -238,6 +238,20 @@ suite("Mode Normal", () => {
|
||||
end: ['one', 'two', '|two']
|
||||
});
|
||||
|
||||
newTest({
|
||||
title: "Can handle 'P' after 'Nyy'",
|
||||
start: ['on|e', 'two', 'three'],
|
||||
keysPressed: '3yyP',
|
||||
end: ['|one', 'two', 'three', 'one', 'two', 'three']
|
||||
});
|
||||
|
||||
newTest({
|
||||
title: "Can handle 'p' after 'Nyy'",
|
||||
start: ['on|e', 'two', 'three'],
|
||||
keysPressed: '3yyp',
|
||||
end: ['one', '|one', 'two', 'three', 'two', 'three']
|
||||
});
|
||||
|
||||
newTest({
|
||||
title: "Can repeat w",
|
||||
start: ['|one two three four'],
|
||||
|
Loading…
Reference in New Issue
Block a user