restore lexer when switching view