Fix bug with keymaps flickering in mouse menu (#11795)
Fixes a bug where Vim bindings would flash in the mouse context menu and then be replaced by the default keybindings. Also fixes those bindings not being usable while the mouse context menu was open. Release Notes: - Fixed bug where Vim bindings were not available when mouse context menu was open --------- Co-authored-by: Conrad Irwin <conrad.irwin@gmail.com>
This commit is contained in:
@@ -1721,6 +1721,12 @@ impl Editor {
|
||||
this
|
||||
}
|
||||
|
||||
pub fn mouse_menu_is_focused(&self, cx: &mut WindowContext) -> bool {
|
||||
self.mouse_context_menu
|
||||
.as_ref()
|
||||
.is_some_and(|menu| menu.context_menu.focus_handle(cx).is_focused(cx))
|
||||
}
|
||||
|
||||
fn key_context(&self, cx: &AppContext) -> KeyContext {
|
||||
let mut key_context = KeyContext::new_with_defaults();
|
||||
key_context.add("Editor");
|
||||
|
||||
Reference in New Issue
Block a user