This commit is contained in:
Garen Torikian 2012-11-30 17:51:48 -08:00 committed by nightwing
commit cb5a8a4be4

View file

@ -771,7 +771,7 @@ var Editor = function(renderer, session) {
mode.autoOutdent(lineState, session, cursor.row);
if (true || this.session.getElasticTabstops()) {
// todo: make this a unique set
// todo: support multicursor
var row = cursor.row;
this.$processRow([row]);
@ -791,7 +791,7 @@ var Editor = function(renderer, session) {
// starting row and backward
var row_iter = row
while (row_iter >= 0) {
widths = cellWidthsForRow(row_iter);
widths = this.$cellWidthsForRow(row_iter);
if (len(widths) == 0)
break;
cellWidths.unshift(widths);
@ -806,7 +806,7 @@ var Editor = function(renderer, session) {
while (row_iter < num_rows - 1) {
row_iter++;
widths = cellWidthsForRow(row_iter);
widths = this.$cellWidthsForRow(row_iter);
if (len(widths) == 0)
break;
cellWidths.push(widths);
@ -827,18 +827,20 @@ var Editor = function(renderer, session) {
//cell = line[left_edge:right_edge]
//widths[i] = max(len(cell.rstrip()), rightmost_selection - left_edge)
//}
return widths;;
//return widths;
};
this.$selectionColumnsForRow = function(row, tabString) {
var selections = [];
selections = []
for s in view.sel():
if s.empty():
r, c =view.rowcol(s.a)
if r == row:
selections.append(c)
return selections
// todo: support multicursor
console.log("roar");
console.log(this.getCursorPositionScreen());
//for s in view.sel():
//if (s.empty())
//r, c =view.rowcol(s.a)
//if (r == row)
// selections.append(c)
return selections;
};
this.$tabsForRow = function(row, tabString) {