From 570ff55339451616d680baf0313e08cc90a9c956 Mon Sep 17 00:00:00 2001 From: Arian Rezazadeh Date: Sat, 4 Jan 2025 10:43:12 +0330 Subject: [PATCH] revert: grit range pointing at pattern definition --- crates/gritmodule/src/dot_grit.rs | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/crates/gritmodule/src/dot_grit.rs b/crates/gritmodule/src/dot_grit.rs index de44d247e..e48c6281d 100644 --- a/crates/gritmodule/src/dot_grit.rs +++ b/crates/gritmodule/src/dot_grit.rs @@ -61,15 +61,15 @@ pub fn get_patterns_from_grit( }; let range = Range::new( Position::new( - pattern_definition.node.start_position().row() + 1, - pattern_definition.node.start_position().column() + 1, + name_node.node.start_position().row() + 1, + name_node.node.start_position().column() + 1, ), Position::new( - pattern_definition.node.end_position().row() + 1, - pattern_definition.node.end_position().column() + 1, + name_node.node.end_position().row() + 1, + name_node.node.end_position().column() + 1, ), - pattern_definition.node.start_byte(), - pattern_definition.node.end_byte(), + name_node.node.start_byte(), + name_node.node.end_byte(), ); let module_grit_pattern = ModuleGritPattern {