Make sure editor is open

Make sure editor is open and active (i.e. not switching files/projects).