diff options
| -rw-r--r-- | src/pardes.zig | 3 | ||||
| -rw-r--r-- | test/fs.py | 3 |
2 files changed, 6 insertions, 0 deletions
diff --git a/src/pardes.zig b/src/pardes.zig index 27cbf383..26c9246a 100644 --- a/src/pardes.zig +++ b/src/pardes.zig @@ -4826,6 +4826,9 @@ pub const Pardes = struct { /// A child for pane `id` in `cwd`: a directory up to PATH_MAX, the ones /// past the effect's inline buffer kept here for perform to give. pub fn emitSpawn(p: *Pardes, id: usize, serial: u32, cwd: []const u8) void { + // A new shell has not said anything yet (setCwd's guard), whatever + // the one it replaces said. + if (p.panes[id]) |pane| pane.shell_spoke = false; if (p.spawn_dirs[id]) |old| p.gpa.free(old); p.spawn_dirs[id] = null; if (cwd.len > effect_path_cap) p.spawn_dirs[id] = p.gpa.dupe(u8, cwd) catch null; @@ -508,6 +508,9 @@ def new_terminals_named_once(binary): client.write('/pane/1/ctl', b'Tty fish\n') made += [s for s in (int(row.split()[0]) for row in client.read('/index').splitlines()) if s not in before] time.sleep(1.5) # their shells start and say where they are + # A shell started again by pty/ctl exec: named as it was. + client.write(f'/pane/{made[0]}/pty/ctl', b'exec\n') + time.sleep(1.5) log = client.read('/log').decode() for serial in made: assert f'\nrename {serial} ' not in '\n' + log, (serial, log) |
