diff options
| author | Gabriel Schneider <[email protected]> | 2026-08-09 06:54:27 -0300 |
|---|---|---|
| committer | Gabriel Schneider <[email protected]> | 2026-08-10 09:17:07 -0300 |
| commit | 599dd82f96b9d091aae78300aa6c3fbc81f9eb69 (patch) | |
| tree | 532d29eb0d79896cd730fb324df4866056306506 /src/macos.zig | |
| parent | 628aa40f13e9bbd313b51ab625f193110aad8dd0 (diff) | |
| download | pardes-599dd82f96b9d091aae78300aa6c3fbc81f9eb69.tar.gz pardes-599dd82f96b9d091aae78300aa6c3fbc81f9eb69.zip | |
review pass: fix the eaten Tab, drop the duplicated code, cover the gaps
Diffstat (limited to 'src/macos.zig')
| -rw-r--r-- | src/macos.zig | 18 |
1 files changed, 12 insertions, 6 deletions
diff --git a/src/macos.zig b/src/macos.zig index 8eb6179a..2e628d54 100644 --- a/src/macos.zig +++ b/src/macos.zig @@ -495,12 +495,11 @@ export fn pardes_cursor_bar() bool { /// Perform the IO the core queued. `threads_ok` is false for the one drain /// inside pardes_init, which runs before any reader task exists. /// -/// ponytail: the lsp, pipe and watch effects are answered with nothing. Each -/// wants real machinery — a worker plus a snapshot of the pane's file for lsp +/// ponytail: the lsp, pipe and watch effects do no work here. Each wants real +/// machinery — a worker plus a snapshot of the pane's file for lsp /// (src/tty/tty.zig:919), a job copy for pipe, and FSEvents for watch, since -/// inotify is Linux-only. The core is built to tolerate an unanswered effect: -/// the browser answers none of these either. Lift tty.zig's implementations -/// when the app is past first light. +/// inotify is Linux-only. Lift tty.zig's implementations when the app is past +/// first light. Pipe and watch may simply be dropped; lsp may NOT, see below. fn drainEffects(st: *State, threads_ok: bool) bool { const core = st.core; var did = false; @@ -589,7 +588,14 @@ fn drainEffects(st: *State, threads_ok: bool) bool { const y = core.yank orelse continue; cb(st.runtime.userdata, y.ptr, y.len); }, - .lsp, .pipe, .watch => {}, + // An empty answer, immediately: the honest reply from a shell with + // no worker, and the only safe one. Tab after a `.` DIVERTS to the + // backend instead of indenting and indents late, when the answer + // comes back empty (lspResponse); drop the effect and lsp_wait + // stays armed, the retroactive indent never fires, and every + // dot-Tab for the rest of the session does nothing at all. + .lsp => |q| core.update(.{ .lsp_resp = .{ .id = q.id, .rows = "" } }), + .pipe, .watch => {}, .quit => {}, } } |
