summaryrefslogtreecommitdiff
path: root/dev/tui
diff options
context:
space:
mode:
Diffstat (limited to 'dev/tui')
-rw-r--r--dev/tui/tui.zig10
1 files changed, 9 insertions, 1 deletions
diff --git a/dev/tui/tui.zig b/dev/tui/tui.zig
index 300e9fea..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) {
@@ -2236,7 +2244,7 @@ fn trailCells(arena: std.mem.Allocator, shown: *const pardes.Surface, trail: *Ju
if (region.kind == .body and cursor.x >= region.rect.x and cursor.x < @as(u32, region.rect.x) + region.rect.w and
cursor.y >= region.rect.y and cursor.y < @as(u32, region.rect.y) + region.rect.h) break region.rect;
} else return shown;
- const ink = shown.chrome.fg orelse .{ 0xcc, 0xcc, 0xcc };
+ const ink = shown.chrome.fg orelse pardes.colors.null_text;
const page = shown.chrome.page orelse pardes.colors.null_page;
const out = try arena.create(pardes.Surface);
out.* = shown.*;