diff options
author | SiegeLord <slabode@aim.com> | 2013-12-21 11:02:21 -0500 |
---|---|---|
committer | SiegeLord <slabode@aim.com> | 2013-12-21 11:02:21 -0500 |
commit | 843f3614503db17a312cf79a546317eff5fd2f91 (patch) | |
tree | fd68e14a4002e88ed7a800501b51edd14cf3466e | |
parent | dac5800933977672e8d2d67854a97a517abbe47d (diff) | |
download | scintilla-mirror-843f3614503db17a312cf79a546317eff5fd2f91.tar.gz |
rust: Fix highlighting of r#"""# raw string literal.
-rw-r--r-- | lexers/LexRust.cxx | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/lexers/LexRust.cxx b/lexers/LexRust.cxx index ce53a23b0..8fd0b0867 100644 --- a/lexers/LexRust.cxx +++ b/lexers/LexRust.cxx @@ -573,6 +573,9 @@ static void ResumeString(Accessor &styler, int& pos, int max) { static void ResumeRawString(Accessor &styler, int& pos, int max, int num_hashes) { for (;;) { + if (pos == styler.LineEnd(styler.GetLine(pos))) + styler.SetLineState(styler.GetLine(pos), num_hashes); + int c = styler.SafeGetCharAt(pos, '\0'); if (c == '"') { pos++; @@ -589,10 +592,9 @@ static void ResumeRawString(Accessor &styler, int& pos, int max, int num_hashes) } else if (c == '\0' || pos >= max) { styler.ColourTo(pos - 1, SCE_RUST_STRINGR); break; + } else { + pos++; } - if (pos == styler.LineEnd(styler.GetLine(pos))) - styler.SetLineState(styler.GetLine(pos), num_hashes); - pos++; } } |