summaryrefslogtreecommitdiff
path: root/dev
diff options
context:
space:
mode:
Diffstat (limited to 'dev')
-rw-r--r--dev/Inbox.zig3
-rw-r--r--dev/file_watch.zig2
-rw-r--r--dev/gui/gui.zig13
-rw-r--r--dev/tui/tui.zig12
4 files changed, 9 insertions, 21 deletions
diff --git a/dev/Inbox.zig b/dev/Inbox.zig
index 1df516cb..bc7c7e8a 100644
--- a/dev/Inbox.zig
+++ b/dev/Inbox.zig
@@ -354,7 +354,8 @@ pub fn land(q: *Inbox, core: *pardes.Pardes, m: Msg) void {
},
.lsp_status => |text| {
var mbuf: [256]u8 = undefined;
- core.setStatus(.at(core.view().active), pardes.Messages.Message.stamp(&mbuf, "lsp", text));
+ // A server's progress, of no pane: the workspace tag's.
+ core.setStatus(.at(pardes.MAX_PANES), pardes.Messages.Message.stamp(&mbuf, "lsp", text));
q.lsp_allocator.free(text);
},
.pipe => |response_value| {
diff --git a/dev/file_watch.zig b/dev/file_watch.zig
index d97e1d3d..74cde864 100644
--- a/dev/file_watch.zig
+++ b/dev/file_watch.zig
@@ -830,7 +830,7 @@ test "a Zerox twin's save wakes its other twin's watch, which says nothing: thei
try tmp.dir.writeFile(io, .{ .sub_path = "twinned", .data = "after\n" });
_ = reloadPane(core, io, &watches, twin, true);
const other = core.panes[twin].?;
- try std.testing.expect(std.mem.indexOf(u8, other.msg[0..other.msg_len], "reloaded") == null);
+ try std.testing.expect(std.mem.indexOf(u8, core.messages.saidBy(other), "reloaded") == null);
try std.testing.expectEqualStrings("after\n", other.file.?.content);
}
diff --git a/dev/gui/gui.zig b/dev/gui/gui.zig
index bc831a69..923db181 100644
--- a/dev/gui/gui.zig
+++ b/dev/gui/gui.zig
@@ -2827,14 +2827,9 @@ fn waitInput(ctx: ?*anyopaque, timeout_ms: u32) void {
/// Detached: no window, asleep until the queue's wake (an SDL user event:
/// a pty's output, the daemon's window request), the core's next wake, or a
-/// quit (SDL makes SIGTERM and SIGINT one). With nobody to dismiss them,
-/// messages go on the clock (the pump's, after this wait), which wakes it.
+/// quit (SDL makes SIGTERM and SIGINT one).
fn waitDetached(core: *pardes.Pardes, timeout_ms: u32) void {
- var ms: c_int = if (timeout_ms != 0) @intCast(@min(timeout_ms, std.math.maxInt(c_int))) else -1;
- for (core.panes) |slot| if (slot) |pane| if (pane.msg_len > 0) {
- ms = if (ms < 0) 100 else @min(ms, 100);
- break;
- };
+ const ms: c_int = if (timeout_ms != 0) @intCast(@min(timeout_ms, std.math.maxInt(c_int))) else -1;
var sev = std.mem.zeroes(c.SDL_Event);
pardes.turn.rest();
var got = c.SDL_WaitEventTimeout(&sev, ms);
@@ -4982,7 +4977,7 @@ fn buildDecor(g: *Gui, gpa: std.mem.Allocator, surface: *const pardes.Surface, g
// A tag on the last row runs on through the pixels under the grid.
const grid_bottom = @as(f32, @floatFromInt(surface.rows)) * layout.h;
const tag_last = for (regions) |region| switch (region.kind) {
- .grip, .tag, .column_grip, .column_tag, .workspace_tag => if (region.rect.h != 0 and region.rect.y + region.rect.h == surface.rows) break true,
+ .grip, .tag, .column_grip, .column_tag, .workspace_tag, .notice_row => if (region.rect.h != 0 and region.rect.y + region.rect.h == surface.rows) break true,
else => {},
} else false;
if (grid_bottom < win_h and tag_last) try addDecor(g, gpa, 0, grid_bottom, win_w, win_h, chrome.tag_bg, 1, win_w, win_h);
@@ -6341,7 +6336,7 @@ test "background opacity acknowledges success and rolls back unsupported surface
try std.testing.expectEqual(applied, core.settings.window_opacity);
try std.testing.expect(!core.settings.window_opacity_pending);
const pane = core.panes[0].?;
- try std.testing.expectEqualStrings("WindowOpacity: background transparency requires an alpha-capable SDL window", pane.msg[0..pane.msg_len]);
+ try std.testing.expectEqualStrings("WindowOpacity: background transparency requires an alpha-capable SDL window", core.messages.saidBy(pane));
try std.testing.expect(core.executeBuiltinLine(0, "WindowOpacity 40"));
try std.testing.expect(core.settings.window_opacity_pending);
diff --git a/dev/tui/tui.zig b/dev/tui/tui.zig
index 44f931b6..542ef59a 100644
--- a/dev/tui/tui.zig
+++ b/dev/tui/tui.zig
@@ -1487,14 +1487,6 @@ const Shell = struct {
// a time while they move: on a virtual clock a millisecond's wait
// moves it a frame (waitOnce), on the real one the pace below sets it.
if (s.moving()) wait = 1;
- // Detached, nobody's key dismisses a message: they go on the clock
- // (the pump's, after this wait), which wakes it.
- if (s.detached()) {
- for (s.core.panes) |slot| if (slot) |pane| if (pane.msg_len > 0) {
- wait = if (wait == 0) 100 else @min(wait, 100);
- break;
- };
- }
const paced = s.test_clock == null and s.moving();
var tick: u64 = 0;
if (paced) {
@@ -2577,9 +2569,9 @@ test "a bracketed paste past the paste limit is cut and said, and a reply droppe
const paste = [_]Msg{ .paste_start, .{ .key_press = .{ .codepoint = 'x', .text = big } }, .{ .key_press = .{ .codepoint = 'y', .text = "y" } }, .paste_end };
for (paste) |ev| _ = shell.apply(ev);
try std.testing.expectEqual(max_paste_bytes, pane.file.?.content.len);
- try std.testing.expect(std.mem.indexOf(u8, pane.msg[0..pane.msg_len], "paste cut") != null);
+ try std.testing.expect(std.mem.indexOf(u8, core.messages.saidBy(pane), "paste cut") != null);
_ = shell.apply(.reply_dropped);
- try std.testing.expectEqualStrings(reply_dropped_words, pane.msg[0..pane.msg_len]);
+ try std.testing.expectEqualStrings(reply_dropped_words, core.messages.saidBy(pane));
}
test "terminal input split at every byte with a gap reads as it does whole" {