T06: terminal view: frame, colors and styles, wide and combining cells, cursor and blink, font, padding, resize; bundled faces and icon font; shot example
CI / platforms (windows-latest) (push) Failing after 8s
CI / macos (push) Failing after 8m31s
CI / platforms (ubuntu-24.04) (push) Canceled after 0s

This commit is contained in:
ZacharyZhang-NY committed 2026-10-14 12:59:32 -04:00
1 parent b4750e61c9
commit ae1d8ce746
23 files changed
+1582 -72

No files matched your search

+10 -4
View File
@@ -4,7 +4,10 @@ use alacritty_terminal::{event::Event, grid::Dimensions, index::Line};
use futures::channel::mpsc::TryRecvError;
use super::*;
use crate::term::{Pty, PtyEvent, spawn};
use crate::{
settings::Settings,
term::{Events, Pty, PtyEvent, config, spawn},
};
/// A folder name with a space, a percent, a bell and a newline.
const INNER: &str = "in ner%\u{7}x\ny";
@@ -35,6 +38,7 @@ fn installed(shell: &str) -> String {
struct Run {
shell: String,
pty: Pty,
events: Events,
root: PathBuf,
start: PathBuf,
folders: Vec<PathBuf>,
@@ -65,10 +69,12 @@ impl Run {
install(&dir).expect("scripts install");
let mut launch = launch(shell, start.clone(), &dir).expect("a launch");
launch.env.push(("HOME".into(), home.display().to_string()));
let pty = spawn(&launch, (100, 30), (8, 16), 100).expect("the shell starts");
let (pty, events) = spawn(&launch, (100, 30), (8, 16), config(&Settings::default()))
.expect("the shell starts");
Self {
shell: shell.into(),
pty,
events,
root,
start,
folders: Vec::new(),
@@ -88,7 +94,7 @@ impl Run {
self.titles,
self.screen()
);
match self.pty.events.try_recv() {
match self.events.try_recv() {
Ok(PtyEvent::Folder(folder)) => self.folders.push(folder),
Ok(PtyEvent::Term(Event::Title(title))) => self.titles.push(title),
Ok(PtyEvent::Term(Event::PtyWrite(reply))) => self.pty.write(reply.into_bytes()),
@@ -142,7 +148,7 @@ impl Run {
"{} did not exit",
self.shell
);
match self.pty.events.try_recv() {
match self.events.try_recv() {
Ok(PtyEvent::Term(Event::ChildExit(_))) | Err(TryRecvError::Closed) => break,
Ok(PtyEvent::Term(Event::PtyWrite(reply))) => self.pty.write(reply.into_bytes()),
Ok(_) => {}