diff options
Diffstat (limited to 'dev/tui')
| -rw-r--r-- | dev/tui/tui.zig | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/dev/tui/tui.zig b/dev/tui/tui.zig index 67c0e2a0..e441df92 100644 --- a/dev/tui/tui.zig +++ b/dev/tui/tui.zig @@ -909,7 +909,7 @@ const Screen = struct { /// the main screen, no mouse, paste or keyboard modes, the cursor shown, /// cooked termios -- and then the signal's own death. A nested editor /// killed in a pane must not leave that pane's terminal wedged. -/// Async-signal-safe: write, tcsetattr, sigaction, raise. +/// Async-signal-safe: write, tcsetattr, kill, sigaction, raise. const Killed = struct { var fd: posix.fd_t = -1; var cooked: posix.termios = undefined; @@ -940,6 +940,8 @@ const Killed = struct { ninep_io.unlinkOwnSocket(); host_io.Shell.unlinkOwnedRcs(); daemon.hangUp(); + // No exit hook runs: the language servers' groups go here. + @import("../lsp/lsp_client.zig").killAllAtExit(); // SA_RESETHAND put the default back: the same signal, now fatal. _ = std.c.raise(sig); } @@ -1789,10 +1791,12 @@ const Shell = struct { vx.freeImage(sc.tty.writer(), removed.value.id); if (stale_len < stale.len) break; } + // A frame with no caret hides the terminal's cursor: shown, it + // would stay where the last caret was. if (shown.cursor) |cur| { win.showCursor(cur.x, cur.y); win.setCursorShape(if (cur.bar) .beam else .default); - } + } else win.hideCursor(); const tz_render = tracy.zone(@src(), "vx.render"); const before = sc.tty.tty_writer.pos + sc.tty.writer().end; vx.render(sc.tty.writer()) catch {}; |
