aboutsummaryrefslogtreecommitdiff
path: root/crates/libeditor/src/extend_selection.rs
diff options
context:
space:
mode:
Diffstat (limited to 'crates/libeditor/src/extend_selection.rs')
-rw-r--r--crates/libeditor/src/extend_selection.rs5
1 files changed, 2 insertions, 3 deletions
diff --git a/crates/libeditor/src/extend_selection.rs b/crates/libeditor/src/extend_selection.rs
index ed7d9b3f7..cb6edb576 100644
--- a/crates/libeditor/src/extend_selection.rs
+++ b/crates/libeditor/src/extend_selection.rs
@@ -1,11 +1,10 @@
1use libsyntax2::{ 1use libsyntax2::{
2 ast, AstNode, 2 ParsedFile, TextRange, SyntaxNodeRef,
3 TextRange, SyntaxNodeRef,
4 SyntaxKind::WHITESPACE, 3 SyntaxKind::WHITESPACE,
5 algo::{find_leaf_at_offset, find_covering_node, ancestors}, 4 algo::{find_leaf_at_offset, find_covering_node, ancestors},
6}; 5};
7 6
8pub fn extend_selection(file: &ast::File, range: TextRange) -> Option<TextRange> { 7pub fn extend_selection(file: &ParsedFile, range: TextRange) -> Option<TextRange> {
9 let syntax = file.syntax(); 8 let syntax = file.syntax();
10 extend(syntax.as_ref(), range) 9 extend(syntax.as_ref(), range)
11} 10}