summaryrefslogtreecommitdiffstats
path: root/zellij-server/src/terminal_bytes.rs
diff options
context:
space:
mode:
authorAram Drevekenin <aram@poor.dev>2022-10-11 16:45:46 +0200
committerGitHub <noreply@github.com>2022-10-11 16:45:46 +0200
commitc64bf5207a0d1b79b305f11a3d73c9da77092b6e (patch)
tree2f5c0efc7c41bc10d96b398c9861d5c7903d2ba8 /zellij-server/src/terminal_bytes.rs
parentcb926119bc5e180c78f2f754bc61532645c3b5b4 (diff)
feat(ux): rerun command pane (#1787)
* chore(config): default kdl keybindings config * tests * work * refactor(config): move stuff around * work * tab merge layout * work * work * layouts working * work * layout tests * work * work * feat(parsing): kdl layouts without config * refactor(kdl): move stuff around * work * tests(layout): add cases and fix bugs * work * fix(kdl): various bugs * chore(layouts): move all layouts to kdl * feat(kdl): shared keybidns * fix(layout): do not count fixed panes toward percentile * fix(keybinds): missing keybinds and actions * fix(config): adjust default tips * refactor(config): move stuff around * fix(tests): make e2e tests pass * fix(kdl): add verbose parsing errors * fix(kdl): focused tab * fix(layout): corret default_tab_template behavior * style(code): fix compile warnings * feat(cli): send actions through the cli * fix(cli): exit only when action is done * fix(cli): open embedded pane from floating pane * fix(cli): send actions to other sessions * feat(cli): command alias * feat(converter): convert old config * feat(converter): convert old layout and theme files * feat(kdl): pretty errors * feat(client): convert old YAML files on startup * fix: various bugs and styling issues * fix: e2e tests * fix(screen): propagate errors after merge * style(clippy): lower clippy level * fix(tests): own session_name variable * style(fmt): rustfmt * fix(cli): various action fixes * style(fmt): rustfmt * fix(themes): loading of theme files * style(fmt): rustfmt * fix(tests): theme fixtures * fix(layouts): better errors on unknown nodes * fix(kdl): clarify valid node terminator error * fix(e2e): adjust close tab test * fix(e2e): adjust close tab test again * style(code): cleanup some comments * get command panes not to exit on command exit * separate terminal pane_ids from raw_fds * render frame according to exit status * re-run command on enter and close pane on ctrl-c * proper error when command is not found * make ui nicer * initial pane title for command panes * fix pane override bug * reap terminal_ids from os_input_output on pane close * bool floating flag * some ui tweaks * fix tests * make rustfmt happy * e2e test for command pane * fix various concurrency issues * rename command to run in the cli * rustfmt * style(fmt): rustfmt * fix(e2e): command => run * fix(e2e): command => run in snapshot too!
Diffstat (limited to 'zellij-server/src/terminal_bytes.rs')
-rw-r--r--zellij-server/src/terminal_bytes.rs6
1 files changed, 4 insertions, 2 deletions
diff --git a/zellij-server/src/terminal_bytes.rs b/zellij-server/src/terminal_bytes.rs
index f716491e5..4fa1e4568 100644
--- a/zellij-server/src/terminal_bytes.rs
+++ b/zellij-server/src/terminal_bytes.rs
@@ -31,6 +31,7 @@ impl From<std::io::Result<usize>> for ReadResult {
pub(crate) struct TerminalBytes {
pid: RawFd,
+ terminal_id: u32,
senders: ThreadSenders,
async_reader: Box<dyn AsyncReader>,
debug: bool,
@@ -47,9 +48,11 @@ impl TerminalBytes {
senders: ThreadSenders,
os_input: Box<dyn ServerOsApi>,
debug: bool,
+ terminal_id: u32,
) -> Self {
TerminalBytes {
pid,
+ terminal_id,
senders,
debug,
async_reader: os_input.async_file_reader(pid),
@@ -77,7 +80,6 @@ impl TerminalBytes {
let mut buf = [0u8; 65536];
loop {
match self.deadline_read(&mut buf).await {
- // match deadline_read(async_reader.as_mut(), self.render_deadline, &mut buf).await {
ReadResult::Ok(0) | ReadResult::Err(_) => break, // EOF or error
ReadResult::Timeout => {
let time_to_send_render =
@@ -93,7 +95,7 @@ impl TerminalBytes {
let _ = debug_to_file(bytes, self.pid);
}
self.async_send_to_screen(ScreenInstruction::PtyBytes(
- self.pid,
+ self.terminal_id,
bytes.to_vec(),
))
.await;