editor: Dismiss mouse context menus on selections change (#28729)
Closes #ISSUE Adds an extra subscription for mouse context menus (i.e. right click context menu) so that when selections change in the editor while the context menu is open (e.g. with vim motions), the context menu closes. Release Notes: - N/A
This commit is contained in:
parent
133932ed74
commit
e7afbbd725
2 changed files with 38 additions and 6 deletions
|
@ -1787,6 +1787,7 @@ impl Editor {
|
|||
cx: &mut Context<Self>,
|
||||
) {
|
||||
self.mouse_context_menu = Some(MouseContextMenu::new(
|
||||
self,
|
||||
crate::mouse_context_menu::MenuPosition::PinnedToScreen(position),
|
||||
context_menu,
|
||||
None,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue