remove temporary debug print statements
Co-authored-by: mikayla.c.maki@gmail.com
This commit is contained in:
parent
8d34fe7e94
commit
31361e564d
4 changed files with 2 additions and 8 deletions
|
@ -115,7 +115,7 @@ impl TerminalConnection {
|
||||||
event: alacritty_terminal::event::Event,
|
event: alacritty_terminal::event::Event,
|
||||||
cx: &mut ModelContext<Self>,
|
cx: &mut ModelContext<Self>,
|
||||||
) {
|
) {
|
||||||
match dbg!(event) {
|
match event {
|
||||||
// TODO: Handle is_self_focused in subscription on terminal view
|
// TODO: Handle is_self_focused in subscription on terminal view
|
||||||
AlacTermEvent::Wakeup => {
|
AlacTermEvent::Wakeup => {
|
||||||
cx.emit(Event::Wakeup);
|
cx.emit(Event::Wakeup);
|
||||||
|
|
|
@ -11,16 +11,13 @@ pub fn deploy_modal(workspace: &mut Workspace, _: &DeployModal, cx: &mut ViewCon
|
||||||
);
|
);
|
||||||
|
|
||||||
if let Some(stored_connection) = possible_connection {
|
if let Some(stored_connection) = possible_connection {
|
||||||
println!("Found stored connection");
|
|
||||||
// Create a view from the stored connection
|
// Create a view from the stored connection
|
||||||
workspace.toggle_modal(cx, |_, cx| {
|
workspace.toggle_modal(cx, |_, cx| {
|
||||||
cx.add_view(|cx| Terminal::from_connection(stored_connection, true, cx))
|
cx.add_view(|cx| Terminal::from_connection(stored_connection, true, cx))
|
||||||
});
|
});
|
||||||
} else {
|
} else {
|
||||||
println!("No global connection :(");
|
|
||||||
// No connection was stored, create a new terminal
|
// No connection was stored, create a new terminal
|
||||||
if let Some(closed_terminal_handle) = workspace.toggle_modal(cx, |workspace, cx| {
|
if let Some(closed_terminal_handle) = workspace.toggle_modal(cx, |workspace, cx| {
|
||||||
println!("Creating new terminal connection");
|
|
||||||
let project = workspace.project().read(cx);
|
let project = workspace.project().read(cx);
|
||||||
let abs_path = project
|
let abs_path = project
|
||||||
.active_entry()
|
.active_entry()
|
||||||
|
@ -33,7 +30,6 @@ pub fn deploy_modal(workspace: &mut Workspace, _: &DeployModal, cx: &mut ViewCon
|
||||||
cx.subscribe(&connection_handle, on_event).detach();
|
cx.subscribe(&connection_handle, on_event).detach();
|
||||||
this
|
this
|
||||||
}) {
|
}) {
|
||||||
println!("Pulled connection from modal and stored in global");
|
|
||||||
let connection = closed_terminal_handle.read(cx).connection.clone();
|
let connection = closed_terminal_handle.read(cx).connection.clone();
|
||||||
cx.set_global(Some(connection));
|
cx.set_global(Some(connection));
|
||||||
}
|
}
|
||||||
|
|
|
@ -139,7 +139,7 @@ impl Terminal {
|
||||||
cx: &mut ViewContext<Self>,
|
cx: &mut ViewContext<Self>,
|
||||||
) -> Terminal {
|
) -> Terminal {
|
||||||
cx.observe(&connection, |_, _, cx| cx.notify()).detach();
|
cx.observe(&connection, |_, _, cx| cx.notify()).detach();
|
||||||
cx.subscribe(&connection, |this, _, event, cx| match dbg!(event) {
|
cx.subscribe(&connection, |this, _, event, cx| match event {
|
||||||
Event::Wakeup => {
|
Event::Wakeup => {
|
||||||
if cx.is_self_focused() {
|
if cx.is_self_focused() {
|
||||||
cx.notify()
|
cx.notify()
|
||||||
|
@ -472,7 +472,6 @@ mod tests {
|
||||||
.condition(cx, |terminal, cx| {
|
.condition(cx, |terminal, cx| {
|
||||||
let term = terminal.connection.read(cx).term.clone();
|
let term = terminal.connection.read(cx).term.clone();
|
||||||
let content = grid_as_str(term.lock().renderable_content().display_iter);
|
let content = grid_as_str(term.lock().renderable_content().display_iter);
|
||||||
dbg!(&content);
|
|
||||||
content.contains("7")
|
content.contains("7")
|
||||||
})
|
})
|
||||||
.await;
|
.await;
|
||||||
|
|
|
@ -218,7 +218,6 @@ impl Element for TerminalEl {
|
||||||
layout: &mut Self::LayoutState,
|
layout: &mut Self::LayoutState,
|
||||||
cx: &mut gpui::PaintContext,
|
cx: &mut gpui::PaintContext,
|
||||||
) -> Self::PaintState {
|
) -> Self::PaintState {
|
||||||
println!("Painted a terminal element");
|
|
||||||
//Setup element stuff
|
//Setup element stuff
|
||||||
let clip_bounds = Some(visible_bounds);
|
let clip_bounds = Some(visible_bounds);
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue