I was editing a Java file and after I corrected the syntax error, the project pane still has that file underlined with red color.
The color box on the right margin was yellow, NOT red.
The "rebuild project" command shows no error. (Compile in background is off in preference.)
The symptom remained after closing and reopening the file.
To get around it, I have to re-open the project.
(IDEA 7.0.3 build 7757.)