mirror of https://github.com/helix-editor/helix
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 modepull/548/head^2
parent
a4564adadd
commit
21e5662125
|
@ -2560,7 +2560,10 @@ fn select_mode(cx: &mut Context) {
|
||||||
}
|
}
|
||||||
|
|
||||||
fn exit_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(
|
fn goto_impl(
|
||||||
|
|
Loading…
Reference in New Issue