mirror of
https://github.com/ilyakooo0/helix.git
synced 2024-12-01 19:58:12 +03:00
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
@ -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…
Reference in New Issue
Block a user