Skip to content

Commit c304550

Browse files
committed
fix running edit in egui_term
1 parent 78fa77b commit c304550

File tree

1 file changed

+6
-2
lines changed
  • crates/egui-term/src/alacritty

1 file changed

+6
-2
lines changed

crates/egui-term/src/alacritty/mod.rs

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -230,8 +230,10 @@ impl Terminal {
230230
let event_proxy = EventProxy(event_sender);
231231
let term = Term::new(config, &term_size, event_proxy.clone());
232232
let term = Arc::new(FairMutex::new(term));
233+
233234
let pty_event_loop = EventLoop::new(term.clone(), event_proxy, pty, false, false)?;
234235
let notifier = Notifier(pty_event_loop.channel());
236+
let pty_notifier = Notifier(pty_event_loop.channel());
235237

236238
let url_regex = r#"(ipfs:|ipns:|magnet:|mailto:|gemini://|gopher://|https://|http://|news:|file://|git://|ssh:|ftp://)[^\u{0000}-\u{001F}\u{007F}-\u{009F}<>"\s{-}\^⟨⟩`]+"#;
237239
let url_regex =
@@ -246,8 +248,10 @@ impl Terminal {
246248
panic!("pty_event_subscription_{id}: sending PtyEvent is failed, error: {err}")
247249
});
248250
app_context.request_repaint();
249-
if let Event::Exit = event {
250-
break;
251+
match event {
252+
Event::Exit => break,
253+
Event::PtyWrite(s) => pty_notifier.notify(s.into_bytes()),
254+
_ => {}
251255
}
252256
})?;
253257

0 commit comments

Comments
 (0)