Fix editor change when the last editor is closed.