reformat the code

This commit is contained in:
Vlad Zinculescu 2012-10-22 18:42:05 +02:00 • committed by nightwing
commit 9c3e6c5cce

View file

@ -1384,14 +1384,8 @@ var Editor = function(renderer, session) {
replaceRange.end.column = nr.end; replaceRange.end.column = nr.end;
this.session.replace(replaceRange, nnr); this.session.replace(replaceRange, nnr);
var cursor = column;
var offset = nnr.length - nr.value.length;
cursor = Math.max(nr.start +1, cursor + offset);
console.log(offset, nr.value.length, nnr.length)
//reposition the cursor //reposition the cursor
this.moveCursorTo(row, cursor ); this.moveCursorTo(row, Math.max(nr.start +1, column + nnr.length - nr.value.length));
} }
} }