No scroll in an editor created via atom.workspace.buildTextEditor


#1

Hi,

In my package I create an editor via atom.workspace.buildTextEditor() then reassign some functions - @editor.getTitle, @editor.save, @editor.getURI, @editor.isModified, editor.serialize - nothing unusual, just to suppress the default functionality.
Then I add this editor to a pane created by one of splitSomething functions via pane.addItem(editor).
This editor is used to dump results of requests executed from the normal editors.

Up until 1.19 all was fine. Since 1.19 there is a problem with scroll in this (and only this) editor - there is no vertical scrollbar, the editor window doesn’t get updated when you scroll it with a mouse or when a cursor moves out of the window. It gets updated only if you click in it - then it scrolls to the right place (I assume).

I guess this is caused by the major update to the rendering layer in 1.19 but I’m not sure what is wrong. Maybe I should call some additional function to update the view state after the editor is added to the pane?

WBR,


#2

Actually it seems it is not related to my package. If you execute the following line in the atom console the result will be the same - atom.workspace.getActivePane().addItem(atom.workspace.buildTextEditor()) - no scroll.


#3

Well, it looks like it needs one special param. This resolves this issue -

atom.workspace.getActivePane().addItem(atom.workspace.buildTextEditor({ autoHeight: false}))