diff options
Diffstat (limited to 'crates/ra_ide/src/syntax_highlighting/injection.rs')
-rw-r--r-- | crates/ra_ide/src/syntax_highlighting/injection.rs | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/crates/ra_ide/src/syntax_highlighting/injection.rs b/crates/ra_ide/src/syntax_highlighting/injection.rs index 8c724af5b..181c21256 100644 --- a/crates/ra_ide/src/syntax_highlighting/injection.rs +++ b/crates/ra_ide/src/syntax_highlighting/injection.rs | |||
@@ -8,8 +8,8 @@ use ra_syntax::{ast, AstToken, SyntaxNode, SyntaxToken, TextRange, TextSize}; | |||
8 | use stdx::SepBy; | 8 | use stdx::SepBy; |
9 | 9 | ||
10 | use crate::{ | 10 | use crate::{ |
11 | call_info::ActiveParameter, Analysis, HighlightModifier, HighlightTag, HighlightedRange, | 11 | call_info::ActiveParameter, Analysis, Highlight, HighlightModifier, HighlightTag, |
12 | RootDatabase, | 12 | HighlightedRange, RootDatabase, |
13 | }; | 13 | }; |
14 | 14 | ||
15 | use super::HighlightedRangeStack; | 15 | use super::HighlightedRangeStack; |
@@ -150,8 +150,7 @@ pub(super) fn highlight_doc_comment( | |||
150 | let (analysis, tmp_file_id) = Analysis::from_single_file(text); | 150 | let (analysis, tmp_file_id) = Analysis::from_single_file(text); |
151 | 151 | ||
152 | stack.push(); | 152 | stack.push(); |
153 | for mut h in analysis.with_db(|db| super::highlight(db, tmp_file_id, None, true, true)).unwrap() | 153 | for mut h in analysis.with_db(|db| super::highlight(db, tmp_file_id, None, true)).unwrap() { |
154 | { | ||
155 | // Determine start offset and end offset in case of multi-line ranges | 154 | // Determine start offset and end offset in case of multi-line ranges |
156 | let mut start_offset = None; | 155 | let mut start_offset = None; |
157 | let mut end_offset = None; | 156 | let mut end_offset = None; |
@@ -183,6 +182,7 @@ pub(super) fn highlight_doc_comment( | |||
183 | for comment in new_comments { | 182 | for comment in new_comments { |
184 | stack.add(comment); | 183 | stack.add(comment); |
185 | } | 184 | } |
186 | stack.pop_and_inject(false); | 185 | stack.pop_and_inject(None); |
187 | stack.pop_and_inject(true); | 186 | stack |
187 | .pop_and_inject(Some(Highlight::from(HighlightTag::Generic) | HighlightModifier::Injected)); | ||
188 | } | 188 | } |