Remove Tree-sitter AST logging from SelectLargerSyntaxNode (#29949)

Release Notes:

- N/A
This commit is contained in:
Michael Sloan 2025-05-06 06:30:06 +02:00 committed by GitHub
parent 3d737fd268
commit 0b10eb7577
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -12999,10 +12999,9 @@ impl Editor {
}
let mut new_range = old_range.clone();
let mut new_node = None;
while let Some((node, containing_range)) = buffer.syntax_ancestor(new_range.clone())
while let Some((_node, containing_range)) =
buffer.syntax_ancestor(new_range.clone())
{
new_node = Some(node);
new_range = match containing_range {
MultiOrSingleBufferOffsetRange::Single(_) => break,
MultiOrSingleBufferOffsetRange::Multi(range) => range,
@ -13014,17 +13013,6 @@ impl Editor {
}
}
if let Some(node) = new_node {
// Log the ancestor, to support using this action as a way to explore TreeSitter
// nodes. Parent and grandparent are also logged because this operation will not
// visit nodes that have the same range as their parent.
log::info!("Node: {node:?}");
let parent = node.parent();
log::info!("Parent: {parent:?}");
let grandparent = parent.and_then(|x| x.parent());
log::info!("Grandparent: {grandparent:?}");
}
selected_larger_node |= new_range != old_range;
Selection {
id: selection.id,