Small refactoring for Editor & Cursor