Stash
This commit is contained in:
parent
92786afa7c
commit
cf079109d7
1 changed files with 46 additions and 0 deletions
|
|
@ -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);
|
||||
}
|
||||
};
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue