From b771a3d4f1a2087ec5938e4a653c6926775caf5b Mon Sep 17 00:00:00 2001 From: Riccardo Mazzarini Date: Mon, 11 May 2026 08:45:41 +0200 Subject: [PATCH] libghostty-vt: preserve shell prompts on resize by default This PR makes libghostty-vt preserve shell prompts across resize unless the shell explicitly opts into prompt clearing/redraw with `redraw=1`. --- src/terminal/c/terminal.zig | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/terminal/c/terminal.zig b/src/terminal/c/terminal.zig index d3293f3bc..773a40b21 100644 --- a/src/terminal/c/terminal.zig +++ b/src/terminal/c/terminal.zig @@ -259,6 +259,11 @@ fn new_( }); errdefer t.deinit(alloc); + // libghostty-vt embedders don't necessarily install Ghostty's shell + // integration, so don't assume OSC 133 prompts can be redrawn on resize. + // Shells can still opt in with OSC 133;A;redraw=1. + t.flags.shell_redraws_prompt = .false; + // Setup our stream with trampolines always installed so that // setting C callbacks at any time takes effect immediately. var handler: Stream.Handler = t.vtHandler();