fix bug of syntax highlighting of text editor