Skip to content

Commit 753d021

Browse files
committed
better autoscrolling in output
1 parent 82de183 commit 753d021

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

page/script.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,8 @@ function addToOutput(txt)
5252
{
5353
logeditor.replaceRange(txt+"\n", CodeMirror.Pos(logeditor.lastLine()))
5454
logeditor.scrollTo(CodeMirror.Pos(logeditor.lastLine()));
55+
var info = logeditor.getScrollInfo();
56+
logeditor.scrollTo(info.left,info.top + info.height);
5557
}
5658

5759
const print = (text) => {

0 commit comments

Comments
 (0)