Commit 44c91794 authored by Franco Pariani's avatar Franco Pariani
Browse files

Fixing scroll after insert line when press Enter

parent e82edf21
......@@ -68,8 +68,10 @@
if (next_block != ""){
file = file + '\n' + next_block;
}
var scrollInfo = editor.getScrollInfo();
editor.setValue(file);
editor.setCursor(CodeMirror.Pos(cur.line, match[1].length + 2));
editor.scrollTo(scrollInfo.left, scrollInfo.top);
}
}else{
var previous_part = curLine.slice(0, start);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment