Fix terminal editor in fg; Bump fff crates to 0.8#8
Open
aohoyd wants to merge 2 commits into
Open
Conversation
063e4f9 unconditionally added `cmd.process_group(0)` to `open_in_editor`, which detaches every spawned editor into its own process group. That fix was needed for the two daemon-side, fire-and-forget call sites so the editor survives the parent exiting, but it broke the terminal-launched one-shot path that already `child.wait()`s: terminal editors (hx, nvim, …) call `tcsetattr` on /dev/tty at startup, which from a background PG raises SIGTTOU and exits the editor silently, leaving the shell prompt with no editor in sight. Make detach-vs-attach a caller decision via `EditorLaunchMode`. Daemon spawns (config-open, picker selection) pass `Detached` and keep the previous behavior; the terminal client passes `Foreground` so the editor inherits the controlling TTY's foreground process group. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
No source changes are needed: the renamed `SharedFilePicker`, the `get_scan_progress()` accessor, and the `::open(path)` tracker constructors that 0.7 introduced are already in use, and 0.8 is a drop-in continuation of that surface. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
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.
Running
fff-gpui --open .from terminal with non-ui editor (e.g. nvim, hx) doesn't not open the selected file. The command just freezes with messageI've added detached mode to open it correctly in the terminal.
Also
fffhas gained some nice features (e.g.ignoresupport) in newer releases, so I've updated it too