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
This commit is contained in:
parent
a4564adadd
commit
21e5662125
1 changed files with 4 additions and 1 deletions
|
@ -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…
Add table
Reference in a new issue