How to scrollToCursorPosition in bottomPanel for a TextEditor


I write a package for open new file content in bottomPanel.
I create a TextEditor manually like

buffer = new TextBuffer('')
    @findView = new TextEditor(_.extend({buffer, registerEditor: true}, {}))
    @goGrammer ?= atom.grammars.grammarForScopeName("source.go")
    #@findView = atom.views.getView(textEditor)

    @findPanel = atom.workspace.addBottomPanel(item: @findView, visible: false, className: 'tool-panel panel-bottom godef')

@findView.setCursorBufferPosition?([options.initialLine, options.initialColumn])

@findView.scrollToCursorPosition() is not working for me.
How can I do?


Sounds maybe like the ScrollView does not scroll problem?


This issue sounds like scrollbar not display.
my issue is scrollToCursorPosition() is working fine in normal TextEditor but not wokring in bottom panel


Are you sure the atom-text-editor in the bottom panel can scroll?
I mean, the text editor should take just the size of the panel so that its own scroll view can operate.


I’m not sure. atom-text-editor can scroll in bottom panel using mouse wheel. So, I want to find some way to scroll the editor through the API

Scrolling the text editor in bottom pane and getting line height

The thing is that you can be deceived in believing the editor scrolls while in fact its the pane that scrolls. I’ll try to reproduce that myself later.