Address some issues where panes don't get focused properly, make the focused pane more obvious, and prevent splitting of the pane with no items
This commit is contained in:
parent
d76cdb01be
commit
225055ed5d
13 changed files with 154 additions and 70 deletions
|
@ -2,7 +2,7 @@ use context_menu::ContextMenuItem;
|
|||
use gpui::{geometry::vector::Vector2F, impl_internal_actions, MutableAppContext, ViewContext};
|
||||
|
||||
use crate::{
|
||||
DisplayPoint, Editor, EditorMode, FindAllReferences, GoToDefinition, Rename, SelectMode,
|
||||
DisplayPoint, Editor, EditorMode, Event, FindAllReferences, GoToDefinition, Rename, SelectMode,
|
||||
ToggleCodeActions,
|
||||
};
|
||||
|
||||
|
@ -23,6 +23,11 @@ pub fn deploy_context_menu(
|
|||
&DeployMouseContextMenu { position, point }: &DeployMouseContextMenu,
|
||||
cx: &mut ViewContext<Editor>,
|
||||
) {
|
||||
if !editor.focused {
|
||||
cx.focus_self();
|
||||
cx.emit(Event::Activate);
|
||||
}
|
||||
|
||||
// Don't show context menu for inline editors
|
||||
if editor.mode() != EditorMode::Full {
|
||||
return;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue