Text in my .cpp files is being greyed-out at seemingly random locations in the code. The problem usually happens in the middle of a function and continues until the end of the function (as though they were in a "#if 0" section). I can backspace back from the first problem line to the last character in the last good line and then insert a newline to restore the coloring to the way it should be, but then it will go back to being greyed-out after awhile. Closing a file and then re-opening it makes the problem happen in the same locations.
I'm using build 1819 (because this problem was happening in the last official release also) with VS2008.
Here's an example (the entire function is greyed out starting at the second line below until the closing bracket): dtp::SpawnPoint* pSpawnPoint = spawnPoint.GetSpawnPoint().Get(); dtp::SpawnList* pSpawnList = spawnList.GetSpawnList(); Instance* pSpawnedInstance = NULL;
Here's another example from a function below the one containing the code above (the entire function is greyed out starting at the second line below): dtp::SpawnList* pSpawnList = spawnList.GetSpawnList(); Instance* pSpawnedInstance = NULL;
What's curious about the last example is that the line that is greyed out in the first example is not greyed out (the greying starting on the following line).
Well I found a solution to this (turn off "Colorize inactive code blocks in a different color" in VS2008->Tools->Text Editor->C/C++->Formatting), but I'm a bit curious about why it started happening in the first place...a conflict between the IDE's coloring and VA I suppose.