From 734789f2f930f67de7476bc73f15c0029c95f92b Mon Sep 17 00:00:00 2001 From: Aidan Montare Date: Tue, 3 Jun 2025 11:57:27 -0600 Subject: [PATCH] change timing to include cursor.next_matched_node --- helix-core/src/syntax.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/helix-core/src/syntax.rs b/helix-core/src/syntax.rs index ccfb00808..6b898b2d8 100644 --- a/helix-core/src/syntax.rs +++ b/helix-core/src/syntax.rs @@ -876,7 +876,6 @@ impl TextObjectQuery { cursor.set_match_limit(TREE_SITTER_MATCH_LIMIT); let query_time = Instant::now(); let mut cursor = cursor.execute_query(&self.query, node, RopeInput::new(slice)); - log::info!("tree-sitter textobject query took: {} us", query_time.elapsed().as_micros()); let capture_node = iter::from_fn(move || { let (mat, _) = cursor.next_matched_node()?; Some(mat.nodes_for_capture(capture).cloned().collect()) @@ -888,6 +887,7 @@ impl TextObjectQuery { nodes.into_iter().map(CapturedNode::Single).next() } }); + log::info!("tree-sitter textobject query took: {} us", query_time.elapsed().as_micros()); Some(capture_node) } }