From f86b91463e34f1e0764db46626af2f137904931f Mon Sep 17 00:00:00 2001 From: nightwing Date: Sat, 21 May 2011 10:05:45 +0500 Subject: [PATCH] creating array for each call to getLine is too expensive if getLines is modified it's better to override getLine too --- lib/ace/document.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/ace/document.js b/lib/ace/document.js index 2a9b7778..70ab0509 100644 --- a/lib/ace/document.js +++ b/lib/ace/document.js @@ -128,7 +128,7 @@ var Document = function(text) { * Get a verbatim copy of the given line as it is in the document */ this.getLine = function(row) { - return this.getLines(row, row + 1)[0] || ""; + return this.$lines[row] || ""; }; this.getLines = function(firstRow, lastRow) {