diff options
author | Blaž Hrastnik | 2021-11-06 08:37:45 +0000 |
---|---|---|
committer | Blaž Hrastnik | 2021-11-06 08:37:45 +0000 |
commit | 6431b26a6a5fa4be5b91008f21537721d2ff4ba2 (patch) | |
tree | af48079d3ce0855c5158ceba9b74f7795abf9253 /helix-term/src | |
parent | 911b9b3276cb155eab023b24f1a6f336f4054087 (diff) |
Implement Selection::replace to replace a single range
Fixes #985
Co-authored-by: Daniel S Poulin <crimsonmage+github@gmail.com>
Diffstat (limited to 'helix-term/src')
-rw-r--r-- | helix-term/src/commands.rs | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/helix-term/src/commands.rs b/helix-term/src/commands.rs index c8f64531..e3ebd128 100644 --- a/helix-term/src/commands.rs +++ b/helix-term/src/commands.rs @@ -1227,8 +1227,7 @@ fn search_impl( Movement::Extend => selection.clone().push(Range::new(start, end)), Movement::Move => selection .clone() - .remove(selection.primary_index()) - .push(Range::new(start, end)), + .replace(selection.primary_index(), Range::new(start, end)), }; doc.set_selection(view.id, selection); |