miniEditor focusses not on rightmost buffer contents without manual cursor movement?


In package-development i discovered, that - if using a miniEditor (via new EditorView({mini:true})) - the clipping-area seems acting different being controlled programmatically than by hand.

If i write content to the miniEditor via .getEditor().setText it may happen, that the displayed line-length of the view-area is exceeded. In that case the view still displays the beginning (leftmost part) of the line, whereas the cursor/focus of the user is suggested to be at the end of the line. This is why i am always ending up in pressing right once, to shift the clipping-area to the right-most side.

I tried to programmatically move the focus of the view by invoking a redraw, moveCursorToEndOfLine, scrollToBufferPosition and so on. It seems that these functions do not take any effect.

I appreciate any hints on how to move the clipping-area of a miniEditor to the end of programmatically added buffer-content.


It also seems like the miniEditor - in general - initializes the clipping-area to the buffers leftmost side, even if the content exceeds it (f.e. if you duplicate or rename files). I would like to have the focus on the right-most-side at once.