diff options
author | Aleksey Kladov <[email protected]> | 2018-12-31 16:01:51 +0000 |
---|---|---|
committer | Aleksey Kladov <[email protected]> | 2018-12-31 16:01:51 +0000 |
commit | f1e8ebfbeb5f84405fb609e3841df02e270037c4 (patch) | |
tree | 6f444b4e85eab9f547b9b2c675c4f53fc169c464 /crates/ra_cli | |
parent | a3ee07ac149867d1d7b9c00a752d0c46c337a878 (diff) |
generalize extend selection to work with nodes
Diffstat (limited to 'crates/ra_cli')
-rw-r--r-- | crates/ra_cli/src/main.rs | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/crates/ra_cli/src/main.rs b/crates/ra_cli/src/main.rs index 939f7fe77..a3b856aa9 100644 --- a/crates/ra_cli/src/main.rs +++ b/crates/ra_cli/src/main.rs | |||
@@ -102,7 +102,7 @@ fn selections(file: &SourceFileNode, start: u32, end: u32) -> String { | |||
102 | let mut cur = Some(TextRange::from_to((start - 1).into(), (end - 1).into())); | 102 | let mut cur = Some(TextRange::from_to((start - 1).into(), (end - 1).into())); |
103 | while let Some(r) = cur { | 103 | while let Some(r) = cur { |
104 | ranges.push(r); | 104 | ranges.push(r); |
105 | cur = extend_selection(&file, r); | 105 | cur = extend_selection(file.syntax(), r); |
106 | } | 106 | } |
107 | let ranges = ranges | 107 | let ranges = ranges |
108 | .iter() | 108 | .iter() |