Because Search comments relies on the style, it didn't consider SCE_C_COMMENTLINEDOC a comment.
However, the problem fundamentally remains because we can't mark more than 4 styles as comments so last 2 are still treated as non-comments by Find. Let's turn all but the first 2 completely off because they don't appear to be used in Notepad2 schema at all (no style entry and visually all "DOC" look the same). There's no Scintilla setting for that so we should patch it.
Also check if any other schema has different comment kinds (apart from singleline/multiline).
e552147c95559cf246b6dc90375cfc30579025c4 fixed the problem with the first line seen as "not comment" (JavaScript schema below):
It turned out Scintilla's JS lexer (which is a CPP lexer in fact) has several kinds of comments, each using a different style:
Because
Search comments
relies on the style, it didn't considerSCE_C_COMMENTLINEDOC
a comment.However, the problem fundamentally remains because we can't mark more than 4 styles as comments so last 2 are still treated as non-comments by Find. Let's turn all but the first 2 completely off because they don't appear to be used in Notepad2 schema at all (no style entry and visually all "DOC" look the same). There's no Scintilla setting for that so we should patch it.
Also check if any other schema has different comment kinds (apart from singleline/multiline).