diff options
Diffstat (limited to 'src/terminal.zig')
| -rw-r--r-- | src/terminal.zig | 21 |
1 files changed, 3 insertions, 18 deletions
diff --git a/src/terminal.zig b/src/terminal.zig index 46790de1..4ee2e9fa 100644 --- a/src/terminal.zig +++ b/src/terminal.zig @@ -16,7 +16,9 @@ const File = panes.File; const ghostty_vt = @import("ghostty-vt"); -pub const history_max = 64; +const EditBuffer = panes.Text.EditBuffer; +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). @@ -416,23 +418,6 @@ fn asGhostRgb(rgb: [3]u8) GColor.RGB { return .{ .r = rgb[0], .g = rgb[1], .b = rgb[2] }; } -/// The owned text standing in for `rows` live terminal rows, beginning at -/// absolute surface row `row`. The emulator grid remains untouched underneath. -pub const EditBuffer = struct { - row: i32 = 0, - rows: i32 = 1, - text: []u8 = &.{}, -}; - -/// One whole-state terminal edit boundary. Null means the pane has not yet -/// materialized an edit buffer; non-null snapshots own their text. -pub const Snapshot = struct { - ovl: ?EditBuffer, - cur_row: i32, - cur_col: i32, - vsel: panes.Text.CharSel, -}; - pub const PendingCommand = struct { bytes: []u8 = &.{}, wait: enum { none, spawn, input } = .none, |
