I want to get the top line number from one editor pane and then scroll another to match. They have identical contents. The one I’m getting the line number from was loaded with a
TextBuffer.setText() and the one I’m scrolling was loaded from a file.
lineNum = editorView.getFirstVisibleScreenRow() from the first editor and
atom.workspaceView.getActiveView().scrollToBufferPosition [lineNum, 0] to scroll the second.
My problem is that the second is scrolling to a line about 20 less than
lineNum matches what I see in the source’s view. But I don’t know whether that number is in buffer or view coordinates. The docs don’t say what coordinate space it is in. The
setPos is in buffer coords. However, I have no wrapped lines so the coordinate systems shouldn’t matter, right.
Can anyone help?