summaryrefslogtreecommitdiff
path: root/core/panes.zig
diff options
context:
space:
mode:
authorGabriel Schneider <[email protected]>2026-11-22 14:14:40 -0300
committerGabriel Schneider <[email protected]>2026-11-22 15:36:59 -0300
commit9041c9d48326ac13e30ffbb0d6df636cc058c6dc (patch)
treeb2487a0824cb691d469afde843ee1039a9501b67 /core/panes.zig
parentb0e96978b619e1111ee2fb30e3c4a48f9fac38b3 (diff)
downloadpardes-9041c9d48326ac13e30ffbb0d6df636cc058c6dc.tar.gz
pardes-9041c9d48326ac13e30ffbb0d6df636cc058c6dc.zip
views: a closed view sizes no terminal, and none takes its size until a view types into it (pardes-term-join-9, item 2 (B), point (b)): `sizes` handed a terminal whose sizing view had closed to whichever view was live at the next `sync`, a view nobody looks at among them, and a client given the closed view's index later sized it without typing; now `Pane.sized_by` is `?u8`, `views.dropView` clears it (the terminal keeps the size it has), `closeKeeping` hands it to the view that takes the closing one's place (the session's own laid out as it was: the size it promised to keep), and `sizes` is `sized_by == live` alone, typing (`typedInto`) the one act that moves it; test (core/views.zig "a terminal shown at two sizes ...", extended): the pty's pixels at the sizing view's cell whichever view is live (point (c) of the change before); the sizing view closed, the size stays until the view left types; a view opened at the closed index sizes nothing until it types (on the base the size moved at the close)
Co-Authored-By: Claude Opus <[email protected]> Claude-Session: https://claude.ai/code/session_016Y9MNBECMWcJD5pdS4SR6T
Diffstat (limited to 'core/panes.zig')
-rw-r--r--core/panes.zig7
1 files changed, 4 insertions, 3 deletions
diff --git a/core/panes.zig b/core/panes.zig
index a2e383c1..d9759d18 100644
--- a/core/panes.zig
+++ b/core/panes.zig
@@ -367,9 +367,10 @@ pub const Pane = struct {
/// The views `pv` holds a share for (a pane retired before a view came
/// has none of it).
pv_known: u8 = 0,
- /// The view that last typed into it: a terminal shown at two sizes takes
- /// that view's (Pardes.sync).
- sized_by: u8 = 0,
+ /// The view that last typed into it, while that view is open: a
+ /// terminal shown at two sizes takes that view's (Pardes.sync); none,
+ /// it keeps the size it has.
+ sized_by: ?u8 = 0,
/// A terminal shown in a view shorter than it (one that does not size
/// it): the rows its top is passed over by, so its cursor stays in
/// sight (Pane.panFor); 0 everywhere else.