fix count handling for p and P

This commit is contained in:
nightwing 2013-02-11 11:41:20 +04:00
commit 901f598b20
2 changed files with 12 additions and 8 deletions

View file

@ -247,7 +247,8 @@ var Document = function(text) {
if (position.row >= length) {
position.row = Math.max(0, length - 1);
position.column = this.getLine(length-1).length;
}
} else if (position.row < 0)
position.row = 0;
return position;
};