I'm building a side-by-side preview, and so I need to get the topmost visible line number in the editor.
I think I can get the top pixel scroll with:
editor.onDidScrollChange(function (e) {
console.error(e.scrollTop);
});
and the cursor line number with:
editor.getPosition().lineNumber
but I didn't manage the top visible line.