Improved support for displaying errors in text editor