Make `exit_select_mode` check current mode (#568)

Change `exit_select_mode` to check that the current mode is select mode
before switching to normal mode
pull/548/head^2
Omnikar 3 years ago committed by GitHub
parent a4564adadd
commit 21e5662125
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -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(

Loading…
Cancel
Save