creating array for each call to getLine is too expensive
if getLines is modified it's better to override getLine too
This commit is contained in:
parent
75c73ece6e
commit
f86b91463e
1 changed files with 1 additions and 1 deletions
|
|
@ -128,7 +128,7 @@ var Document = function(text) {
|
||||||
* Get a verbatim copy of the given line as it is in the document
|
* Get a verbatim copy of the given line as it is in the document
|
||||||
*/
|
*/
|
||||||
this.getLine = function(row) {
|
this.getLine = function(row) {
|
||||||
return this.getLines(row, row + 1)[0] || "";
|
return this.$lines[row] || "";
|
||||||
};
|
};
|
||||||
|
|
||||||
this.getLines = function(firstRow, lastRow) {
|
this.getLines = function(firstRow, lastRow) {
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue