Reload shortcuts when layout changed
This commit is contained in:
parent
fa3abe789c
commit
366b5d13b0
1 changed files with 4 additions and 4 deletions
|
@ -1308,11 +1308,11 @@ pub fn handle_keymap_file_changes(
|
|||
})
|
||||
.detach();
|
||||
|
||||
let mut current_mapping = settings::get_key_equivalents(cx.keyboard_layout().id());
|
||||
let mut current_layout_id = cx.keyboard_layout().id().to_string();
|
||||
cx.on_keyboard_layout_change(move |cx| {
|
||||
let next_mapping = settings::get_key_equivalents(cx.keyboard_layout().id());
|
||||
if next_mapping != current_mapping {
|
||||
current_mapping = next_mapping;
|
||||
let next_layout_id = cx.keyboard_layout().id();
|
||||
if next_layout_id != current_layout_id {
|
||||
current_layout_id = next_layout_id.to_string();
|
||||
keyboard_layout_tx.unbounded_send(()).ok();
|
||||
}
|
||||
})
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue