summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/Core.zig2
-rw-r--r--src/Kind.zig2
-rw-r--r--src/fs.zig2
-rw-r--r--src/panes.zig2
-rw-r--r--src/pardes.zig6
-rw-r--r--src/replica.zig10
-rw-r--r--src/rollback.zig2
-rw-r--r--src/tape.zig4
-rw-r--r--src/term/TerminalImages.zig (renamed from src/TerminalImages.zig)4
-rw-r--r--src/term/echo.zig (renamed from src/echo.zig)4
-rw-r--r--src/term/screen_state.zig (renamed from src/screen_state.zig)6
-rw-r--r--src/term/terminal.zig (renamed from src/terminal.zig)14
-rw-r--r--src/wire.zig4
13 files changed, 31 insertions, 31 deletions
diff --git a/src/Core.zig b/src/Core.zig
index c5187616..40dabda3 100644
--- a/src/Core.zig
+++ b/src/Core.zig
@@ -362,7 +362,7 @@ restore_req: ?[]const u8 = null,
restore_buf: [1024]u8 = @splat(0),
surface: Surface = .{},
-/// A replica's predicted echo (src/echo.zig), drawn over its terminals:
+/// A replica's predicted echo (src/term/echo.zig), drawn over its terminals:
/// presentation, its own, in no digest and no rollback copy. Null on a
/// session's own core.
echo: ?*pardes.echo.Echo = null,
diff --git a/src/Kind.zig b/src/Kind.zig
index 250e1144..54c7e0e7 100644
--- a/src/Kind.zig
+++ b/src/Kind.zig
@@ -199,7 +199,7 @@ pub const Slot = struct {
/// Collapse Del.
tail: Buf(160) = .{},
/// A replica's frame of it, as the authority painted it.
- shadow: ?*@import("screen_state.zig").Shadow = null,
+ shadow: ?*@import("term/screen_state.zig").Shadow = null,
/// Debug: the kind's allocations, which paint must leave as they are
/// (the list the page allocator's: a region's first is slow in Debug).
used: if (checked) std.ArrayList([]u8) else void = if (checked) .empty else {},
diff --git a/src/fs.zig b/src/fs.zig
index d90bb8c0..b5cb979b 100644
--- a/src/fs.zig
+++ b/src/fs.zig
@@ -54,7 +54,7 @@ const source_files = [_]Source{
.{ .path = "src/File.zig", .contents = @embedFile("File.zig") },
.{ .path = "src/Output.zig", .contents = @embedFile("Output.zig") },
.{ .path = "src/mini.zig", .contents = @embedFile("mini.zig") },
- .{ .path = "src/terminal.zig", .contents = @embedFile("terminal.zig") },
+ .{ .path = "src/term/terminal.zig", .contents = @embedFile("term/terminal.zig") },
.{ .path = "src/layout.zig", .contents = @embedFile("layout.zig") },
.{ .path = "src/fs.zig", .contents = @embedFile("fs.zig") },
.{ .path = "src/look.zig", .contents = @embedFile("look.zig") },
diff --git a/src/panes.zig b/src/panes.zig
index 29a9f051..b03cd7cd 100644
--- a/src/panes.zig
+++ b/src/panes.zig
@@ -730,7 +730,7 @@ pub const Dir = @import("Dir.zig");
pub const mini = @import("mini.zig");
-pub const terminal = @import("terminal.zig");
+pub const terminal = @import("term/terminal.zig");
// ---- the session's pane slots: making, finding, closing and freeing panes, and their prompts ----
diff --git a/src/pardes.zig b/src/pardes.zig
index 9f5c36ff..95adf54d 100644
--- a/src/pardes.zig
+++ b/src/pardes.zig
@@ -72,11 +72,11 @@ pub const config = @import("config.zig");
pub const memory = @import("memory.zig");
pub const tape = @import("tape.zig");
pub const walk = @import("walk.zig");
-pub const screen_state = @import("screen_state.zig");
+pub const screen_state = @import("term/screen_state.zig");
pub const views = @import("views.zig");
pub const rollback = @import("rollback.zig");
pub const replica = @import("replica.zig");
-pub const echo = @import("echo.zig");
+pub const echo = @import("term/echo.zig");
pub const Kind = @import("Kind.zig");
/// A terminal's kitty pictures; its PNG resize is started with the shell.
pub const TerminalImages = panes.terminal.TerminalImages;
@@ -392,7 +392,7 @@ test {
_ = @import("Effect.zig");
_ = @import("tape.zig");
_ = @import("replica.zig");
- _ = @import("echo.zig");
+ _ = @import("term/echo.zig");
_ = @import("modal.zig");
_ = @import("tagline.zig");
_ = @import("hunks.zig");
diff --git a/src/replica.zig b/src/replica.zig
index dd6f34bc..c5ec4aec 100644
--- a/src/replica.zig
+++ b/src/replica.zig
@@ -30,7 +30,7 @@ const walk = @import("walk.zig");
const wire = @import("wire.zig");
const daemon = @import("daemon.zig");
const writeAll = daemon.writeAll;
-const screen_state = @import("screen_state.zig");
+const screen_state = @import("term/screen_state.zig");
const c_heap = @import("c_heap");
const terminal = pardes.panes.terminal;
const Allocator = std.mem.Allocator;
@@ -281,7 +281,7 @@ pub const Authority = struct {
}
};
-// ---- terminals as screen state (src/screen_state.zig) ----
+// ---- terminals as screen state (src/term/screen_state.zig) ----
//
// A message of either side is u8 pane, u32 the pane's serial (a slot's
// next pane is another), u8 kind, and the kind's bytes:
@@ -680,7 +680,7 @@ pub const Replica = struct {
screen_out: std.ArrayListUnmanaged(u8) = .empty,
/// Its Shadows' rasters, from the session's strips (17.3).
blobs: screen_state.Blobs = .{},
- /// Its predicted echo (src/echo.zig), drawn over its core's terminals:
+ /// Its predicted echo (src/term/echo.zig), drawn over its core's terminals:
/// fed by its keys, its units and its deltas here, and by `echoFrame`.
echo: pardes.echo.Echo = .{},
@@ -754,7 +754,7 @@ pub const Replica = struct {
c.in_len = 0;
c.in_head = 0;
tape.adoptCore(&r.t, c);
- // Its keys into a terminal drawn at once (src/echo.zig).
+ // Its keys into a terminal drawn at once (src/term/echo.zig).
c.echo = &r.echo;
return r;
}
@@ -1852,7 +1852,7 @@ pub const Peers = struct {
boundary_ns: std.ArrayListUnmanaged(u64) = .empty,
cut: u32 = 0,
head: [unit_head]u8 = undefined,
- /// Its clients' terminals as screen state (src/screen_state.zig), while
+ /// Its clients' terminals as screen state (src/term/screen_state.zig), while
/// it records: what each was sent.
screens: Screens = undefined,
msgs: std.ArrayListUnmanaged([]u8) = .empty,
diff --git a/src/rollback.zig b/src/rollback.zig
index 461ba45b..d5810a86 100644
--- a/src/rollback.zig
+++ b/src/rollback.zig
@@ -518,7 +518,7 @@ fn annotatedStruct(comptime T: type) bool {
/// is taken: what is in their slots is nothing), the frame statistics
/// (numbers), and the rows a terminal was last read as
/// (a grid's worth of text, emptied when a copy is taken and when it is
-/// put back: src/replica.zig), and a replica's predicted echo (src/echo.zig:
+/// put back: src/replica.zig), and a replica's predicted echo (src/term/echo.zig:
/// the replica's, never its core's). And the store and Recent, a replica's
/// own: on the host's heap (Pardes.recentGpa), which the epoch never puts a
/// free off for, so their bytes put back would point at what is freed. A
diff --git a/src/tape.zig b/src/tape.zig
index c617f2a2..68413315 100644
--- a/src/tape.zig
+++ b/src/tape.zig
@@ -21,7 +21,7 @@ const std = @import("std");
const pardes = @import("pardes.zig");
const walk = @import("walk.zig");
const host_io = @import("host_io.zig");
-const terminal = @import("terminal.zig");
+const terminal = @import("term/terminal.zig");
const Pardes = pardes.Pardes;
const VTable = pardes.Host.VTable;
const libc = std.c;
@@ -253,7 +253,7 @@ pub const Tape = struct {
dump_check: bool = false,
dumps: usize = 0,
dump_bytes: usize = 0,
- /// Screen-state terminals (src/screen_state.zig, docs/next-daemon.md
+ /// Screen-state terminals (src/term/screen_state.zig, docs/next-daemon.md
/// phase 5): an authority recording for replicas, or a replica. A
/// terminal's emulator is the authority's alone: its output is recorded
/// without its bytes (they cross as screen state), its pty writes are
diff --git a/src/TerminalImages.zig b/src/term/TerminalImages.zig
index f8fed78e..6894945c 100644
--- a/src/TerminalImages.zig
+++ b/src/term/TerminalImages.zig
@@ -9,13 +9,13 @@
//! through the U+10EEEE placeholder cells the program prints.
const std = @import("std");
const ghostty_vt = @import("ghostty-vt");
-const pardes = @import("pardes.zig");
+const pardes = @import("../pardes.zig");
const zstbi = @import("zstbi");
const wuffs = @import("wuffs");
const TerminalImages = @This();
const gfx = ghostty_vt.kitty.graphics;
-const PixelRect = @import("surface.zig").RectPx;
+const PixelRect = @import("../surface.zig").RectPx;
/// The bytes ghostty-vt may hold for one screen's images (it evicts the
/// oldest past this): a 4K picture in RGBA, with room for a second.
diff --git a/src/echo.zig b/src/term/echo.zig
index 3d2ee060..4f27a08f 100644
--- a/src/echo.zig
+++ b/src/term/echo.zig
@@ -28,7 +28,7 @@
//! prompt or a program that ignores input confirms none, so nothing typed
//! there is ever shown.
const std = @import("std");
-const pardes = @import("pardes.zig");
+const pardes = @import("../pardes.zig");
const terminal = pardes.panes.terminal;
const Pardes = pardes.Pardes;
const Pane = pardes.Pane;
@@ -552,7 +552,7 @@ fn keyboardPane(c: *const Pardes, view: u8) ?usize {
// ---- tests: one authority and one replica, its shell played by hand ----
const testing = std.testing;
-const replica = @import("replica.zig");
+const replica = @import("../replica.zig");
const Rig = struct {
a: *replica.Authority,
diff --git a/src/screen_state.zig b/src/term/screen_state.zig
index 8032e79a..bbb7f959 100644
--- a/src/screen_state.zig
+++ b/src/term/screen_state.zig
@@ -24,7 +24,7 @@
//! delta against another (one lost) is refused, and the peer started afresh.
//!
//! The replica writes each delta into a ghostty Terminal, which a replica's
-//! terminal pane draws as a local one (src/terminal.zig reads only that).
+//! terminal pane draws as a local one (src/term/terminal.zig reads only that).
//! Rows that scroll off its active area go into its history, made what the
//! authority's are by the delta's tail (their addresses, up to a screen of
//! them). Older ones it never saw, or saw before they last changed, are
@@ -1147,7 +1147,7 @@ pub fn yesStream(gpa: std.mem.Allocator, lines: usize) ![]u8 {
// loses nothing, so what the authority last sent a peer is what the peer
// holds, but for a raster its `Blobs` let go, which it asks for again.
-const Kind = @import("Kind.zig");
+const Kind = @import("../Kind.zig");
const Cell = Kind.c.pa_cell;
const Place = Kind.c.pa_placement;
@@ -1517,7 +1517,7 @@ test "several deltas in flight land in order, and a peer at the bound waits for
}
test "a replica's terminal pane draws as its authority's does" {
- const pardes = @import("pardes.zig");
+ const pardes = @import("../pardes.zig");
const gpa = testing.allocator;
const a = try pardes.Pardes.init(gpa, .{ .tty_only = true, .cols = 60, .rows = 16 });
defer a.deinit();
diff --git a/src/terminal.zig b/src/term/terminal.zig
index 4ee2e9fa..bc5e7fd6 100644
--- a/src/terminal.zig
+++ b/src/term/terminal.zig
@@ -1,14 +1,14 @@
//! A terminal pane: its VT emulator, prompt rows, the edit overlay
//! typed over shell rows, and the Filter that recolours output to the theme.
-const panes = @import("panes.zig");
+const panes = @import("../panes.zig");
const std = @import("std");
-const pardes = @import("pardes.zig");
-const config = @import("config.zig");
+const pardes = @import("../pardes.zig");
+const config = @import("../config.zig");
const Pardes = pardes.Pardes;
const Surface = pardes.Surface;
-const modal = @import("modal.zig");
-const tracy = @import("tracy.zig");
-const tagline = @import("tagline.zig");
+const modal = @import("../modal.zig");
+const tracy = @import("../tracy.zig");
+const tagline = @import("../tagline.zig");
const Key = pardes.Key;
const Pane = panes.Pane;
const EditText = panes.EditText;
@@ -21,7 +21,7 @@ const Snapshot = panes.Text.Snapshot;
const history_max = panes.Text.history_max;
pub const VtSlot = ghostty_vt.Terminal;
-/// A cell of an emulator's pages, as `getCell` reads it (src/echo.zig).
+/// A cell of an emulator's pages, as `getCell` reads it (src/term/echo.zig).
pub const PageCell = ghostty_vt.PageList.Cell;
/// Kitty graphics: a program's images are placements, as a kind's are.
pub const images_enabled = true;
diff --git a/src/wire.zig b/src/wire.zig
index 3dd08b29..5900c3f7 100644
--- a/src/wire.zig
+++ b/src/wire.zig
@@ -88,7 +88,7 @@ pub const ClientTag = enum(u8) {
hello = 0x01,
bye = 0x02,
ping = 0x03,
- /// A replica's word about a terminal's state (src/screen_state.zig): the
+ /// A replica's word about a terminal's state (src/term/screen_state.zig): the
/// delta it holds, or rows it asks for. Opaque here.
screen_ack = 0x04,
/// What is the session's digest, in stream order (a replica checks
@@ -170,7 +170,7 @@ pub const ServerTag = enum(u8) {
/// A unit of the authority's stream (src/replica.zig): its origin, seq,
/// clocks and tape.
unit = 0x05,
- /// A terminal's delta, or rows asked for (src/screen_state.zig), applied
+ /// A terminal's delta, or rows asked for (src/term/screen_state.zig), applied
/// before the next unit. Opaque here.
screen = 0x06,
/// The session's digest (u64le), after every unit before it.