From 5913073733b8724d97589ec9999252256708cf3c Mon Sep 17 00:00:00 2001
From: Ryan Mehri <ryan.mehri1@gmail.com>
Date: Sun, 5 Nov 2023 08:14:39 -0800
Subject: [PATCH] make replace with clipboard commands exit select mode

---
 helix-term/src/commands.rs | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/helix-term/src/commands.rs b/helix-term/src/commands.rs
index 4e73568b..d300f848 100644
--- a/helix-term/src/commands.rs
+++ b/helix-term/src/commands.rs
@@ -4144,10 +4144,12 @@ fn replace_with_yanked_impl(editor: &mut Editor, register: char, count: usize) {
 
 fn replace_selections_with_clipboard(cx: &mut Context) {
     replace_with_yanked_impl(cx.editor, '+', cx.count());
+    exit_select_mode(cx);
 }
 
 fn replace_selections_with_primary_clipboard(cx: &mut Context) {
     replace_with_yanked_impl(cx.editor, '*', cx.count());
+    exit_select_mode(cx);
 }
 
 fn paste(editor: &mut Editor, register: char, pos: Paste, count: usize) {