Fix PageUp for context menu (#13593)
The PageUp key was not working for the context menu. Instead of selecting one of the previous items in the context menu, `MovePageUp` closed the menu and scrolled the editor. `MovePageDown` was working correctly because it has the same fix. Release Notes: - Fixed `pageup` key, when bound to `editor::MovePageUp`, not moving context menus as other keys
This commit is contained in:
parent
00d1561156
commit
6e1b99b039
1 changed files with 10 additions and 0 deletions
|
@ -6812,6 +6812,16 @@ impl Editor {
|
|||
return;
|
||||
}
|
||||
|
||||
if self
|
||||
.context_menu
|
||||
.write()
|
||||
.as_mut()
|
||||
.map(|menu| menu.select_first(self.project.as_ref(), cx))
|
||||
.unwrap_or(false)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
if matches!(self.mode, EditorMode::SingleLine { .. }) {
|
||||
cx.propagate();
|
||||
return;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue