on master help sign in
Make `exit_select_mode` check current mode (#568)
21e5662Omnikar
helix-term/src/commands.rs+4−1
@@ -2560,7 +2560,10 @@ fn select_mode(cx: &mut Context) {
2560}
2560}
2561
2561
2562fn exit_select_mode(cx: &mut Context) {
2562fn exit_select_mode(cx: &mut Context) {
2563− doc_mut!(cx.editor).mode = Mode::Normal;
2563+ let doc = doc_mut!(cx.editor);
2564+ if doc.mode == Mode::Select {
2565+ doc.mode = Mode::Normal;
2566+ }
2564}
2567}
2565
2568
2566fn goto_impl(
2569fn goto_impl(