diff --git a/helix-core/src/syntax.rs b/helix-core/src/syntax.rs index 677392b1e..ff547c588 100644 --- a/helix-core/src/syntax.rs +++ b/helix-core/src/syntax.rs @@ -723,7 +723,7 @@ impl Syntax { let mut layers = self .layers .iter() - .flat_map(|(_, layer)| { + .filter_map(|(_, layer)| { // Reuse a cursor from the pool if available. let mut cursor = PARSER.with(|ts_parser| { let highlighter = &mut ts_parser.borrow_mut();