Repository navigation
fix(editor): skip kitty new-tab when no listen socket to avoid Ctrl+E hang - #311
Open
FelixZhang wants to merge 1 commit into
Open
FelixZhang wants to merge 1 commit into
FelixZhang wants to merge 1 commit into
Conversation
FelixZhang
force-pushed
the
fix/kitty-editor-hang
branch
from
September 29, 2026 06:55
f978cbd to
98f0a64
Compare
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 #310 —
Ctrl+Efreezing the whole TUI when leaf runs under herdr (or any PTY multiplexer) with kitty 0.49.1 and noallow_remote_control.Root Cause
When
KITTY_PIDis present, leaf attemptskitty @ launchto open the editor in a new tab. Under a PTY multiplexer, the kitty-cmd DCS response cannot pass back through, sokitty @waits indefinitely (confirmed withtimeout 8 kitty @ ls).LaunchStrategy::RunAndCheckblocks inCommand::status(), freezing the TUI before the in-place fallback can run. kitty 0.48.2 failed fast, which is why this started with the 0.49.1 upgrade.Fix
Only attempt the
kitty @new-tab launch whenKITTY_LISTEN_ONis set (socket mode). Without it,kitty @cannot work reliably, so leaf falls straight through to the proven in-place editor path. This is independent of kitty's remote-control behavior and multiplexer environment.Testing
KITTY_LISTEN_ONgate (present / absent)kitty_tab_title_uses_filenametest updated for the gatecargo test— 512 passed, 0 failedcargo clippy --all-targets --all-features -- -D warningscargo build --releaseCtrl+Eopens nvim in place and returns cleanlyThe second commit collapses a nested
else ifflagged by nightly clippy on 1.28.3; no behavior change.