From 6ea2db586f76b78ffdba07b41650182f7d69ebea Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Zbigniew=20R=C4=99bacz?= Date: Sun, 23 Mar 2025 08:16:30 +0100 Subject: [PATCH] CodeEditor: Added NOTE as special comment keyword. (#239) --- uppsrc/CodeEditor/CHighlight.cpp | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/uppsrc/CodeEditor/CHighlight.cpp b/uppsrc/CodeEditor/CHighlight.cpp index 440cbe83f..6bf39d9e4 100644 --- a/uppsrc/CodeEditor/CHighlight.cpp +++ b/uppsrc/CodeEditor/CHighlight.cpp @@ -126,9 +126,8 @@ const wchar *CSyntax::DoComment(HighlightOutput& hls, const wchar *p, const wcha for(const wchar *s = p; s < e && !IsLetter(*s); s++) n++; hls.SetFlags(n, flags); - static WString todo = "TODO"; - static WString fixme = "FIXME"; - if(w.GetCount() >= 4 && w.GetCount() <= 5 && findarg(w, todo, fixme) >= 0) + static const Index key_words = {"TODO", "NOTE", "FIXME"}; + if(w.GetCount() >= 4 && w.GetCount() <= 5 && key_words.Find(w) >= 0) hls.Put(n, hl_style[INK_COMMENT_WORD], hl_style[PAPER_COMMENT_WORD]); else hls.Put(n, hl_style[INK_COMMENT]);