Fix cursor visibility and command palette rendering in zellij#1338
Merged
Fix cursor visibility and command palette rendering in zellij#1338
Conversation
Wrap terminal.draw() with crossterm's BeginSynchronizedUpdate / EndSynchronizedUpdate (DEC private mode 2026). Without synchronized updates, zellij splits fresh's render into multiple frames, causing: 1. Command palette appearing invisible until the next user interaction (zellij renders a phantom frame without palette content before the palette data arrives) 2. Cursor flickering/disappearing during navigation (intermediate frames show hidden cursor state between redraws) With this fix, zellij batches the entire render atomically - palette opens in 1 chunk instead of 2, with 0 phantom frames. https://claude.ai/code/session_01W6Pe5tA84E8rBjVcRNwCur
sinelaw
added a commit
that referenced
this pull request
Mar 24, 2026
The REVERSED cell modifier + hardware block cursor caused double-inversion in terminal multiplexers like zellij, making the cursor invisible. Now REVERSED is only applied to the primary cursor in software_cursor_only mode (GUI backend). When a hardware cursor is available, it alone provides the primary cursor visual; secondary cursors still use REVERSED. Co-Authored-By: Claude Opus 4.6 (1M context) <[email protected]>
sinelaw
added a commit
that referenced
this pull request
Mar 24, 2026
The REVERSED cell modifier + hardware block cursor caused double-inversion in terminal multiplexers like zellij, making the cursor invisible. Now REVERSED is only applied to the primary cursor in software_cursor_only mode (GUI backend). When a hardware cursor is available, it alone provides the primary cursor visual; secondary cursors still use REVERSED. Co-Authored-By: Claude Opus 4.6 (1M context) <[email protected]>
sinelaw
added a commit
that referenced
this pull request
Mar 24, 2026
The REVERSED cell modifier + hardware block cursor caused double-inversion in terminal multiplexers like zellij, making the cursor invisible. Now REVERSED is only applied to the primary cursor in software_cursor_only mode (GUI backend). When a hardware cursor is available, it alone provides the primary cursor visual; secondary cursors still use REVERSED. Co-Authored-By: Claude Opus 4.6 (1M context) <[email protected]>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Fixes #1255 — cursor disappearing and command palette not visible when running fresh inside zellij.
terminal.draw()with crossterm'sBeginSynchronizedUpdate/EndSynchronizedUpdate(DEC private mode 2026)Root Cause
Without synchronized updates, zellij splits fresh's single render into multiple output frames. This causes two user-visible bugs:
Command palette invisible until interaction: Zellij emits a
SHOW_CURSOR(signaling "frame complete") 13ms before the palette content arrives. The terminal renders a phantom frame showing the editor without the palette. The palette only appears on the next frame — which in some cases doesn't arrive until the next user input.Cursor flickering/disappearing during navigation: Zellij adds
HIDE_CURSOR/SHOW_CURSORpairs around its redraws. Without sync updates, intermediate states (cursor hidden, content partially drawn) are visible between frames.Verification
Measured palette rendering through zellij before and after:
Cursor movement also now arrives in a single atomic chunk instead of being split across frames.
Test plan
cargo test --lib— 95 passed, 0 failed?2026h/?2026l) are emitted by freshhttps://claude.ai/code/session_01W6Pe5tA84E8rBjVcRNwCur