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