Remove cursor propogation
This commit is contained in:
parent
4d94636247
commit
d54921fcc9
1 changed files with 10 additions and 10 deletions
|
|
@ -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;
|
||||
};
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue