on master help sign in
fix offset by one problem in replace_with_yanked
commit5d23667a268caa9237f1e17cb2092b387801c547 authorAndreas Liljeqvist <bonega@gmail.com> dateSun 13 Jun 2021, 20:27 (5 years ago) parentb6e363e
1 file changed+1−1
helix-term/src/commands.rs+1−1
helix-term/src/commands.rs+1−1
@@ -2240,7 +2240,7 @@ pub fn replace_with_yanked(cx: &mut Context) {
22402240 let transaction =
22412241 Transaction::change_by_selection(doc.text(), doc.selection(view.id), |range| {
22422242 let max_to = doc.text().len_chars().saturating_sub(1);
2243− let to = std::cmp::min(max_to, range.to());
2243+ let to = std::cmp::min(max_to, range.to() + 1);
22442244 (range.from(), to, Some(yank.as_str().into()))
22452245 });
22462246