Give focus to the selected terminal
Co-Authored-By: Max Brunsfeld <maxbrunsfeld@gmail.com>
This commit is contained in:
parent
baa9e271d5
commit
ad7e49ed06
6 changed files with 43 additions and 20 deletions
|
@ -31,6 +31,7 @@ use serde::Deserialize;
|
|||
use serde_json::to_string_pretty;
|
||||
use settings::{keymap_file_json_schema, settings_file_json_schema, Settings};
|
||||
use std::{borrow::Cow, env, path::Path, str, sync::Arc};
|
||||
use terminal_view::terminal_button::{self, TerminalButton};
|
||||
use util::{channel::ReleaseChannel, paths, ResultExt, StaffMode};
|
||||
use uuid::Uuid;
|
||||
pub use workspace;
|
||||
|
@ -73,6 +74,7 @@ actions!(
|
|||
const MIN_FONT_SIZE: f32 = 6.0;
|
||||
|
||||
pub fn init(app_state: &Arc<AppState>, cx: &mut gpui::MutableAppContext) {
|
||||
terminal_button::init(cx);
|
||||
cx.add_action(about);
|
||||
cx.add_global_action(|_: &Hide, cx: &mut gpui::MutableAppContext| {
|
||||
cx.platform().hide();
|
||||
|
@ -330,6 +332,7 @@ pub fn initialize_workspace(
|
|||
)
|
||||
});
|
||||
|
||||
let toggle_terminal = cx.add_view(|cx| TerminalButton::new(workspace_handle.clone(), cx));
|
||||
let diagnostic_summary =
|
||||
cx.add_view(|cx| diagnostics::items::DiagnosticIndicator::new(workspace.project(), cx));
|
||||
let activity_indicator =
|
||||
|
@ -340,6 +343,10 @@ pub fn initialize_workspace(
|
|||
workspace.status_bar().update(cx, |status_bar, cx| {
|
||||
status_bar.add_left_item(diagnostic_summary, cx);
|
||||
status_bar.add_left_item(activity_indicator, cx);
|
||||
// TODO: Remove this when things are done
|
||||
if **cx.default_global::<StaffMode>() {
|
||||
status_bar.add_right_item(toggle_terminal, cx);
|
||||
}
|
||||
status_bar.add_right_item(cursor_position, cx);
|
||||
status_bar.add_right_item(feedback_button, cx);
|
||||
});
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue