This commit is contained in:
Garen Torikian 2012-11-26 16:37:39 -08:00 committed by nightwing
commit cf079109d7

View file

@ -769,6 +769,51 @@ var Editor = function(renderer, session) {
}
if (shouldOutdent)
mode.autoOutdent(lineState, session, cursor.row);
if (true || this.session.getElasticTabstops()) {
var row = 0, rows = this.session.getLength(),
tabString = "\t";
while (row <= rows) {
var cellWidths = this.$findCellWidthsForBlock(row, tabString),
cellWidthsByRow = cellWidths.byRow, rowIndex = cellWidths.rowIndex;
}
}
};
this.$findCellWidthsForBlock = function(row, tabString) {
var cellWidths = [];
var rowIter = row;
while (rowIter >= 0) {
var widths = this.$cellWidthsForRow(rowIter, tabString);
}
};
this.$cellWidthsForRow = function(row, tabString) {
var selectionColumns = this.$selectionColumnsForRow(row, tabString);
};
this.$selectionColumnsForRow = function(row, tabString) {
var selections = [];
};
this.$tabsForRow = function(row, tabString) {
var rowTabs = [];
var matches = session.getLine(row).match(new RegExp(tabString, "g"));
if (matches !== null) {
for (var m = 0, matchLength = matches.length; m < matchLength; m++) {
rowTabs.push(matches[m].length);
}
}
return rowTabs;
};
this.onTextInput = function(text) {
@ -1212,6 +1257,7 @@ var Editor = function(renderer, session) {
indentString = lang.stringRepeat(" ", count);
} else
indentString = "\t";
return this.insert(indentString);
}
};