diff --git a/lib/ace/editor.js b/lib/ace/editor.js index 47749f5d..f2945c83 100644 --- a/lib/ace/editor.js +++ b/lib/ace/editor.js @@ -774,12 +774,12 @@ var Editor = function(renderer, session) { // todo: support multicursor var row = cursor.row; - this.$processRow(cursor, [row]); + this.$processRow([row]); } }; - this.$processRow = function(cursor, rows) { + this.$processRow = function(rows) { var checkedRows = []; for (var r = 0, rowCount = rows.length; r < rowCount; r++) { @@ -787,7 +787,7 @@ var Editor = function(renderer, session) { if (checkedRows.indexOf(row) > -1) continue; - var cellWidthObj = this.$findCellWidthsForBlock(cursor, row); + var cellWidthObj = this.$findCellWidthsForBlock(row); var cellWidths = this.$setBlockCellWidthsToMax(cellWidthObj.cellWidths); var rowIndex = cellWidthObj.firstRow; @@ -800,13 +800,13 @@ var Editor = function(renderer, session) { } }; - this.$findCellWidthsForBlock = function(cursor, row) { + this.$findCellWidthsForBlock = function(row) { var cellWidths = [], widths; // starting row and backward var rowIter = row; while (rowIter >= 0) { - widths = this.$cellWidthsForRow(cursor, rowIter); + widths = this.$cellWidthsForRow(rowIter); if (widths.length == 0) break; @@ -822,7 +822,7 @@ var Editor = function(renderer, session) { while (rowIter < numRows - 1) { rowIter++; - widths = this.$cellWidthsForRow(cursor, rowIter); + widths = this.$cellWidthsForRow(rowIter); if (widths.length == 0) break; @@ -832,8 +832,8 @@ var Editor = function(renderer, session) { return { cellWidths: cellWidths, firstRow: firstRow }; }; - this.$cellWidthsForRow = function(cursor, row) { - var selectionColumns = this.$selectionColumnsForRow(cursor, row); + this.$cellWidthsForRow = function(row) { + var selectionColumns = this.$selectionColumnsForRow(row); // todo: support multicursor var tabs = [-1].concat(this.$tabsForRow(row)); @@ -852,10 +852,10 @@ var Editor = function(renderer, session) { return widths; }; - this.$selectionColumnsForRow = function(cursor, row) { + this.$selectionColumnsForRow = function(row) { var selections = []; // todo: support multicursor - selections.push(cursor.column + 1); + selections.push(this.getCursorPosition().column + 1); return selections; };