Merge branch 'main' into terminal-element
This commit is contained in:
commit
fd31e429f5
103 changed files with 10646 additions and 3579 deletions
|
@ -9,11 +9,10 @@ pub mod terminal_panel;
|
|||
// use crate::terminal_element::TerminalElement;
|
||||
use editor::{scroll::autoscroll::Autoscroll, Editor};
|
||||
use gpui::{
|
||||
actions, div, point, px, size, Action, AnyElement, AppContext, Bounds, Div, Element,
|
||||
EventEmitter, FocusEvent, FocusHandle, Focusable, FocusableElement, FocusableView, Font,
|
||||
FontStyle, FontWeight, InputHandler, InteractiveElement, KeyContext, KeyDownEvent, Keystroke,
|
||||
Model, MouseButton, MouseDownEvent, ParentElement, Pixels, Render, SharedString, Styled,
|
||||
Subscription, Task, View, ViewContext, VisualContext, WeakView, WindowContext,
|
||||
actions, div, point, px, size, Action, AnyElement, AppContext, Bounds, Div, EventEmitter,
|
||||
FocusEvent, FocusHandle, Focusable, FocusableElement, FocusableView, Font, FontStyle,
|
||||
FontWeight, InputHandler, KeyContext, KeyDownEvent, Keystroke, Model, MouseButton,
|
||||
MouseDownEvent, Pixels, Render, Task, View, VisualContext, WeakView, Subscription
|
||||
};
|
||||
use language::Bias;
|
||||
use persistence::TERMINAL_DB;
|
||||
|
@ -28,13 +27,13 @@ use terminal::{
|
|||
};
|
||||
use terminal_element::TerminalElement;
|
||||
use theme::ThemeSettings;
|
||||
use ui::{h_stack, prelude::*, ContextMenu, Icon, IconElement, Label};
|
||||
use util::{paths::PathLikeWithPosition, ResultExt};
|
||||
use workspace::{
|
||||
item::{BreadcrumbText, Item, ItemEvent},
|
||||
notifications::NotifyResultExt,
|
||||
register_deserializable_item,
|
||||
searchable::{SearchEvent, SearchOptions, SearchableItem},
|
||||
ui::{ContextMenu, Icon, IconElement, Label},
|
||||
CloseActiveItem, NewCenterTerminal, Pane, ToolbarItemLocation, Workspace, WorkspaceId,
|
||||
};
|
||||
|
||||
|
@ -793,6 +792,8 @@ impl InputHandler for TerminalView {
|
|||
}
|
||||
|
||||
impl Item for TerminalView {
|
||||
type Event = ItemEvent;
|
||||
|
||||
fn tab_tooltip_text(&self, cx: &AppContext) -> Option<SharedString> {
|
||||
Some(self.terminal().read(cx).title().into())
|
||||
}
|
||||
|
@ -800,7 +801,8 @@ impl Item for TerminalView {
|
|||
fn tab_content(&self, _detail: Option<usize>, cx: &WindowContext) -> AnyElement {
|
||||
let title = self.terminal().read(cx).title();
|
||||
|
||||
div()
|
||||
h_stack()
|
||||
.gap_2()
|
||||
.child(IconElement::new(Icon::Terminal))
|
||||
.child(Label::new(title))
|
||||
.into_any()
|
||||
|
@ -900,6 +902,10 @@ impl Item for TerminalView {
|
|||
.detach();
|
||||
self.workspace_id = workspace.database_id();
|
||||
}
|
||||
|
||||
fn to_item_events(event: &Self::Event, mut f: impl FnMut(ItemEvent)) {
|
||||
f(*event)
|
||||
}
|
||||
}
|
||||
|
||||
impl SearchableItem for TerminalView {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue