diff options
Diffstat (limited to 'helix-term/src/commands.rs')
-rw-r--r-- | helix-term/src/commands.rs | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/helix-term/src/commands.rs b/helix-term/src/commands.rs index d8e377c8..d34afda4 100644 --- a/helix-term/src/commands.rs +++ b/helix-term/src/commands.rs @@ -472,7 +472,11 @@ pub fn replace(cx: &mut Context) { let transaction = Transaction::change_by_selection(doc.text(), doc.selection(view.id), |range| { - (range.from(), range.to() + 1, Some(text.clone())) + ( + range.from(), + range.to() + 1, + Some(text.repeat(range.to() - range.from() + 1).into()), + ) }); doc.apply(&transaction, view.id); |