diff options
Diffstat (limited to 'dev/tui')
| -rw-r--r-- | dev/tui/tui.zig | 15 |
1 files changed, 12 insertions, 3 deletions
diff --git a/dev/tui/tui.zig b/dev/tui/tui.zig index 835fda6d..8cb06b05 100644 --- a/dev/tui/tui.zig +++ b/dev/tui/tui.zig @@ -1328,6 +1328,7 @@ const Shell = struct { .open_link = openLink, .start = host_io.startDetached, .lsp = lsp, + .lsp_open = lspOpen, .pipe = pipe, .search = search, .job = job, @@ -2047,6 +2048,13 @@ const Shell = struct { s.core.reportError(req.pane, "lsp", error.WorkersUnavailable); } + /// Not held for `threads_ok`: the boot's file and a restored + /// session's are opened before `start`. + fn lspOpen(ctx: ?*anyopaque, pane: pardes.Pane.Id) void { + const s = of(ctx); + s.ptys.queue.openLsp(s.core, pane); + } + fn pipe(ctx: ?*anyopaque, id: u32) void { const s = of(ctx); if (!s.threads_ok) { @@ -3353,13 +3361,14 @@ test "a terminal client's view, opened from a window's, wraps a tag at its own w if (region.kind != .tag) continue; for (region.rect.y..region.rect.y + region.rect.h) |y| { for (s.cells[y * s.cols ..][region.rect.x..][0..region.rect.w]) |cell| try shown.appendSlice(gpa, if (cell.len == 0) " " else cell.grapheme()); - try shown.append(gpa, '\n'); } } // Each of its words shows: wrapped at its rows' width, none lost - // between a row cut short and the next. + // between a row cut short and the next (its rows read on, as a word + // the wrap cuts runs on to the next). + errdefer std.debug.print("{s}\n", .{shown.items}); for (&words) |*w| if (std.mem.indexOf(u8, shown.items, w) == null) { - std.debug.print("{s} is not shown in the tag:\n{s}\n", .{ w, shown.items }); + std.debug.print("{s} is not shown in the tag\n", .{w}); return error.TestUnexpectedResult; }; } |
