From 473b2a0d1c6f92cc197428bc3d011fb32071a024 Mon Sep 17 00:00:00 2001 From: Lawrence Chen <54008264+lawrencecchen@users.noreply.github.com> Date: Thu, 12 Mar 2026 03:44:06 -0700 Subject: [PATCH] docs: clarify fork head and test env setup --- docs/ghostty-fork.md | 14 ++++++++++++-- tests/test_ghostty_zsh_pure_preprompt_redraw.py | 3 ++- 2 files changed, 14 insertions(+), 3 deletions(-) diff --git a/docs/ghostty-fork.md b/docs/ghostty-fork.md index dd3d6dc5..36189e2d 100644 --- a/docs/ghostty-fork.md +++ b/docs/ghostty-fork.md @@ -71,7 +71,16 @@ section 3 copy-mode commit, even though the section 4 resize commits were applie - Emits one `OSC 133;A` fresh-prompt mark for real prompt transitions. - Uses `OSC 133;P` markers for prompt redraws so async zsh themes do not look like extra prompt lines. -The fork branch HEAD is now the section 5 zsh redraw commit. +### 6) zsh Pure-style multiline prompt redraws + +- Commit: `0cf559581` (zsh: fix Pure-style multiline prompt redraws) +- Files: + - `src/shell-integration/zsh/ghostty-integration` +- Summary: + - Handles multiline prompts that use `\n%{\r%}` to return to column 0 before the visible prompt line. + - Places the continuation marker after Pure's hidden carriage return so async redraws do not leave stale preprompt lines behind. + +The fork branch HEAD is now the section 6 zsh redraw commit. ## Upstreamed fork changes @@ -93,6 +102,7 @@ These files change frequently upstream; be careful when rebasing the fork: - `src/shell-integration/zsh/ghostty-integration` - Prompt marker handling is easy to regress when upstream adjusts zsh redraw behavior. Keep the - `OSC 133;A` vs `OSC 133;P` split intact for redraw-heavy themes. + `OSC 133;A` vs `OSC 133;P` split intact for redraw-heavy themes, and preserve the special + handling for Pure-style `\n%{\r%}` prompt newlines. If you resolve a conflict, update this doc with what changed. diff --git a/tests/test_ghostty_zsh_pure_preprompt_redraw.py b/tests/test_ghostty_zsh_pure_preprompt_redraw.py index 76efa13f..f59fe75e 100644 --- a/tests/test_ghostty_zsh_pure_preprompt_redraw.py +++ b/tests/test_ghostty_zsh_pure_preprompt_redraw.py @@ -99,7 +99,8 @@ def _capture_session(*, use_ghostty: bool, wrapper_dir: Path, resources_dir: Pat env = dict(os.environ) env["HOME"] = str(home) env["TERM"] = "xterm-256color" - env["PATH"] = "/opt/homebrew/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin" + env.pop("GHOSTTY_SHELL_FEATURES", None) + env.pop("GHOSTTY_BIN_DIR", None) if use_ghostty: env["ZDOTDIR"] = str(wrapper_dir) env["GHOSTTY_ZSH_ZDOTDIR"] = str(home)