aboutsummaryrefslogtreecommitdiff
path: root/crates/ra_editor/src/extend_selection.rs
diff options
context:
space:
mode:
Diffstat (limited to 'crates/ra_editor/src/extend_selection.rs')
-rw-r--r--crates/ra_editor/src/extend_selection.rs2
1 files changed, 1 insertions, 1 deletions
diff --git a/crates/ra_editor/src/extend_selection.rs b/crates/ra_editor/src/extend_selection.rs
index 9ee1df281..9d8df25c3 100644
--- a/crates/ra_editor/src/extend_selection.rs
+++ b/crates/ra_editor/src/extend_selection.rs
@@ -63,7 +63,7 @@ fn extend_ws(root: SyntaxNodeRef, ws: SyntaxNodeRef, offset: TextUnit) -> TextRa
63 let prefix = TextRange::from_to(ws.range().start(), offset) - ws.range().start(); 63 let prefix = TextRange::from_to(ws.range().start(), offset) - ws.range().start();
64 let ws_suffix = &ws_text.as_str()[suffix]; 64 let ws_suffix = &ws_text.as_str()[suffix];
65 let ws_prefix = &ws_text.as_str()[prefix]; 65 let ws_prefix = &ws_text.as_str()[prefix];
66 if ws_text.contains("\n") && !ws_suffix.contains("\n") { 66 if ws_text.contains('\n') && !ws_suffix.contains('\n') {
67 if let Some(node) = ws.next_sibling() { 67 if let Some(node) = ws.next_sibling() {
68 let start = match ws_prefix.rfind('\n') { 68 let start = match ws_prefix.rfind('\n') {
69 Some(idx) => ws.range().start() + TextUnit::from((idx + 1) as u32), 69 Some(idx) => ws.range().start() + TextUnit::from((idx + 1) as u32),