We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 32977ed commit 066367cCopy full SHA for 066367c
helix-core/src/syntax.rs
@@ -372,10 +372,8 @@ impl Syntax {
372
let config_ref =
373
unsafe { mem::transmute::<_, &'static HighlightConfiguration>(self.config.as_ref()) };
374
375
- // TODO: if reusing cursors this might need resetting
376
- if let Some(range) = &range {
377
- cursor_ref.set_byte_range(range.clone());
378
- }
+ // if reusing cursors & no range this resets to whole range
+ cursor_ref.set_byte_range(range.clone().unwrap_or(0..usize::MAX));
379
380
let captures = cursor_ref
381
.captures(query_ref, tree_ref.root_node(), RopeProvider(source))
0 commit comments