Fix auto scrolling issue in debugger on step in and step out. Fixes #3554.

This commit is contained in:
Aditya Toshniwal
2018-08-29 18:20:45 +05:30
committed by Akshay Joshi
parent 208ee4da8c
commit 283a69a21a
6 changed files with 65 additions and 55 deletions
@@ -0,0 +1,7 @@
import CodeMirror from 'codemirror/lib/codemirror';
CodeMirror.defineExtension('centerOnLine', function(line) {
var ht = this.getScrollInfo().clientHeight;
var coords = this.charCoords({line: line, ch: 0}, 'local');
this.scrollTo(null, (coords.top + coords.bottom - ht) / 2);
});