summaryrefslogtreecommitdiff
path: root/helix-term/src
diff options
context:
space:
mode:
Diffstat (limited to 'helix-term/src')
-rw-r--r--helix-term/src/commands.rs5
1 files changed, 4 insertions, 1 deletions
diff --git a/helix-term/src/commands.rs b/helix-term/src/commands.rs
index 29be5ccd..f8c5d480 100644
--- a/helix-term/src/commands.rs
+++ b/helix-term/src/commands.rs
@@ -2560,7 +2560,10 @@ fn select_mode(cx: &mut Context) {
}
fn exit_select_mode(cx: &mut Context) {
- doc_mut!(cx.editor).mode = Mode::Normal;
+ let doc = doc_mut!(cx.editor);
+ if doc.mode == Mode::Select {
+ doc.mode = Mode::Normal;
+ }
}
fn goto_impl(