reformat the code
This commit is contained in:
parent
e3ad71b4e1
commit
9c3e6c5cce
1 changed files with 6 additions and 12 deletions
|
|
@ -1384,14 +1384,8 @@ var Editor = function(renderer, session) {
|
|||
replaceRange.end.column = nr.end;
|
||||
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
|
||||
this.moveCursorTo(row, cursor );
|
||||
this.moveCursorTo(row, Math.max(nr.start +1, column + nnr.length - nr.value.length));
|
||||
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue