Permalink
Browse files

Define insertRowAbove in terms of insertRowBelow

  • Loading branch information...
1 parent e265915 commit 9ec4616be9904aac0d2cef91621b964a5f9b9e8f @georgebrock georgebrock committed Nov 11, 2013
Showing with 1 addition and 5 deletions.
  1. +1 −5 js/base.js
View
@@ -186,12 +186,8 @@
}
};
Vimulator.Base.prototype.insertRowAbove = function (text, index) {
- var newLines, i;
index = index || this.cursor.row;
- newLines = text.split('\n');
- for (i = newLines.length - 1; i >= 0; i -= 1) {
- this.lines.splice(index, 0, newLines[i]);
- }
+ this.insertRowBelow(text, index - 1);
};
Vimulator.Base.prototype.replaceRow = function (text, index) {
index = (typeof index === "undefined" ? this.cursor.row : index);

0 comments on commit 9ec4616

Please sign in to comment.