editor: ensure cursor is at the top