ide: Comment spell checking now ignores non-letters

git-svn-id: svn://ultimatepp.org/upp/trunk@12707 f0d560ea-af0d-0410-9eb7-867de7ffcac7
This commit is contained in:
cxl 2019-01-23 21:26:05 +00:00
parent 405d94870b
commit 8a0b2bb308

View file

@ -97,12 +97,14 @@ const wchar *CSyntax::DoComment(HighlightOutput& hls, const wchar *p, const wcha
for(const wchar *s = p; s < e && IsLetter(*s); s++)
w.Cat(ToUpper(*s));
int n = w.GetCount();
if(!n)
word flags = 0;
if(n) {
if(comments_lang && !SpellWord(w, comments_lang))
flags = LineEdit::SPELLERROR;
}
else
for(const wchar *s = p; s < e && !IsLetter(*s); s++)
n++;
word flags = 0;
if(n && comments_lang && !SpellWord(w, comments_lang))
flags = LineEdit::SPELLERROR;
hls.SetFlags(n, flags);
static WString todo = "TODO";
static WString fixme = "FIXME";