mirror of
https://github.com/ultimatepp/ultimatepp.git
synced 2026-07-11 22:03:01 -06:00
CodeEditor: Minor improvement of LogSyntax.cpp
git-svn-id: svn://ultimatepp.org/upp/trunk@7779 f0d560ea-af0d-0410-9eb7-867de7ffcac7
This commit is contained in:
parent
bb9f6f799b
commit
9872c28807
1 changed files with 2 additions and 2 deletions
|
|
@ -20,14 +20,14 @@ void LogSyntax::Highlight(const wchar *s, const wchar *end, HighlightOutput& hls
|
|||
hls.Put(int(s - s0), hl_style[fp ? INK_CONST_FLOAT : INK_CONST_INT]);
|
||||
}
|
||||
else
|
||||
if(IsAlpha(*s)) {
|
||||
if(IsAlpha(*s) || *s == '_') {
|
||||
static Index<String> rws;
|
||||
ONCELOCK {
|
||||
rws << "error" << "errors" << "warning" << "warnings" << "failed" << "exit" << "fatal"
|
||||
<< "failure" << "rejected";
|
||||
}
|
||||
String w;
|
||||
while(IsAlNum(*s))
|
||||
while(IsAlNum(*s) || *s == '_')
|
||||
w.Cat(ToLower(*s++));
|
||||
bool hl = rws.Find(w) >= 0;
|
||||
hls.Put(w.GetCount(), hl ? err : ink);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue