From 87ea7e131a1e67f2af76231e67057033e3d711de Mon Sep 17 00:00:00 2001 From: SiegeLord Date: Sat, 21 Dec 2013 11:02:21 -0500 Subject: rust: Fix highlighting of r#"""# raw string literal. --- lexers/LexRust.cxx | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'lexers') 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++; } } -- cgit v1.2.3