After some research i looks that in stable 1.18 release everything works as expected.
I determined that minimal code that cause problem for me goes like this:
- I create a new editor
- split active pane with this new editor as only item
- focus to new pane.
I don’t even invoke any scrolling function. It looks like this:
this is function that i invoke with a command:
toggle: function(){
var editor, inactiveEditor, activePane, newPane;
editor = atom.workspace.getActiveTextEditor();
if (!editor) {
return;
}
inactiveEditor = atom.workspace.buildTextEditor();
inactiveEditor.getTitle = function(){
return 'Source Preview';
};
inactiveEditor.setGrammar(atom.grammars.grammarForScopeName('source.js'));
inactiveEditor.isModified = function(){
return false;
};
inactiveEditor.setText(editor.getText());
activePane = atom.workspace.getActivePane();
newPane = activePane.splitRight({
items: [inactiveEditor]
});
activePane.activate();
}
Is this a bug or am I doing something wrong?