From d6c7030aeb084106a3c4bae765731421e8ac1dbd Mon Sep 17 00:00:00 2001 From: Aleksey Kladov Date: Wed, 19 Sep 2018 00:46:10 +0300 Subject: Add emacs function for extend shirnk selection --- crates/ra_syntax/src/algo/mod.rs | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'crates/ra_syntax/src/algo') diff --git a/crates/ra_syntax/src/algo/mod.rs b/crates/ra_syntax/src/algo/mod.rs index 7287f5bb2..8de44c586 100644 --- a/crates/ra_syntax/src/algo/mod.rs +++ b/crates/ra_syntax/src/algo/mod.rs @@ -78,7 +78,11 @@ impl<'f> Iterator for LeafAtOffset<'f> { } pub fn find_covering_node(root: SyntaxNodeRef, range: TextRange) -> SyntaxNodeRef { - assert!(is_subrange(root.range(), range)); + assert!( + is_subrange(root.range(), range), + "node range: {:?}, target range: {:?}", + root.range(), range, + ); let (left, right) = match ( find_leaf_at_offset(root, range.start()).right_biased(), find_leaf_at_offset(root, range.end()).left_biased() -- cgit v1.2.3