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
|
// todo: support multicursor
|
||||||
var row = cursor.row;
|
var row = cursor.row;
|
||||||
|
|
||||||
this.$processRow(cursor, [row]);
|
this.$processRow([row]);
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
this.$processRow = function(cursor, rows) {
|
this.$processRow = function(rows) {
|
||||||
var checkedRows = [];
|
var checkedRows = [];
|
||||||
|
|
||||||
for (var r = 0, rowCount = rows.length; r < rowCount; r++) {
|
for (var r = 0, rowCount = rows.length; r < rowCount; r++) {
|
||||||
|
|
@ -787,7 +787,7 @@ var Editor = function(renderer, session) {
|
||||||
|
|
||||||
if (checkedRows.indexOf(row) > -1)
|
if (checkedRows.indexOf(row) > -1)
|
||||||
continue;
|
continue;
|
||||||
var cellWidthObj = this.$findCellWidthsForBlock(cursor, row);
|
var cellWidthObj = this.$findCellWidthsForBlock(row);
|
||||||
var cellWidths = this.$setBlockCellWidthsToMax(cellWidthObj.cellWidths);
|
var cellWidths = this.$setBlockCellWidthsToMax(cellWidthObj.cellWidths);
|
||||||
var rowIndex = cellWidthObj.firstRow;
|
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;
|
var cellWidths = [], widths;
|
||||||
|
|
||||||
// starting row and backward
|
// starting row and backward
|
||||||
var rowIter = row;
|
var rowIter = row;
|
||||||
while (rowIter >= 0) {
|
while (rowIter >= 0) {
|
||||||
widths = this.$cellWidthsForRow(cursor, rowIter);
|
widths = this.$cellWidthsForRow(rowIter);
|
||||||
if (widths.length == 0)
|
if (widths.length == 0)
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
|
@ -822,7 +822,7 @@ var Editor = function(renderer, session) {
|
||||||
while (rowIter < numRows - 1) {
|
while (rowIter < numRows - 1) {
|
||||||
rowIter++;
|
rowIter++;
|
||||||
|
|
||||||
widths = this.$cellWidthsForRow(cursor, rowIter);
|
widths = this.$cellWidthsForRow(rowIter);
|
||||||
if (widths.length == 0)
|
if (widths.length == 0)
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
|
@ -832,8 +832,8 @@ var Editor = function(renderer, session) {
|
||||||
return { cellWidths: cellWidths, firstRow: firstRow };
|
return { cellWidths: cellWidths, firstRow: firstRow };
|
||||||
};
|
};
|
||||||
|
|
||||||
this.$cellWidthsForRow = function(cursor, row) {
|
this.$cellWidthsForRow = function(row) {
|
||||||
var selectionColumns = this.$selectionColumnsForRow(cursor, row);
|
var selectionColumns = this.$selectionColumnsForRow(row);
|
||||||
// todo: support multicursor
|
// todo: support multicursor
|
||||||
|
|
||||||
var tabs = [-1].concat(this.$tabsForRow(row));
|
var tabs = [-1].concat(this.$tabsForRow(row));
|
||||||
|
|
@ -852,10 +852,10 @@ var Editor = function(renderer, session) {
|
||||||
return widths;
|
return widths;
|
||||||
};
|
};
|
||||||
|
|
||||||
this.$selectionColumnsForRow = function(cursor, row) {
|
this.$selectionColumnsForRow = function(row) {
|
||||||
var selections = [];
|
var selections = [];
|
||||||
// todo: support multicursor
|
// todo: support multicursor
|
||||||
selections.push(cursor.column + 1);
|
selections.push(this.getCursorPosition().column + 1);
|
||||||
return selections;
|
return selections;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue