I originally reported this on Notepad++ but was told that it needed to be reported on Scintilla. The problem is related to the handling of the continuation character when it is the last item of a C++ style comment line.
// This is a comment that happens to have a continuation character at the end \
The C/C++ compiler will treat the "a=1;" line as a continuation of the comment line. You will get a warning (thankfully) but Notepad++ doesn't recognize the continuation character as a continuation of the comment. With MS VS it will color code both the comment line and the "a=1;" line to give the programmer a visual of what is going on.
I ran into this because I had the following in my comment line:
// this is my comment from the directory /a/b/c/
The compiler gave me a warning of a multiline comment but I didn't pay attention to it... it then commented out the if statement and allowed the code to fall into the block set off by the if.
It would be useful to have the parser recognize the continuation character at the end of the single line comment and have the next line color coded appropriately to give a visual to the developer that the next line is also considered a comment line.
Log in to post a comment.