Skip to content

Commit

Permalink
fix #654 (#656)
Browse files Browse the repository at this point in the history
  • Loading branch information
xconverge authored and johnfn committed Aug 26, 2016
1 parent bb788a5 commit a45b2b6
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
2 changes: 1 addition & 1 deletion src/actions/actions.ts
Original file line number Diff line number Diff line change
Expand Up @@ -871,7 +871,7 @@ export class DeleteOperator extends BaseOperator {
resultingPosition = Position.EarlierOf(start, end);
}

if (start.character >= TextEditor.getLineAt(start).text.length) {
if (start.character > TextEditor.getLineAt(start).text.length) {
resultingPosition = start.getLeft();
} else {
resultingPosition = start;
Expand Down
7 changes: 7 additions & 0 deletions test/mode/modeNormal.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1072,6 +1072,13 @@ suite("Mode Normal", () => {
end: ["abc abc |dhi"]
});

newTest({
title: "can handle p in visual to end of line",
start: ["1234 |5678", "test test"],
keysPressed: "vllllyjvllllp",
end: ["1234 5678", "test |5678", ""]
});

newTest({
title: "can repeat backspace twice",
start: ["|11223344"],
Expand Down

0 comments on commit a45b2b6

Please sign in to comment.