Handle editor switching and fix syntax check regression