Skip to content

Fix terminal editor in fg; Bump fff crates to 0.8#8

Open
aohoyd wants to merge 2 commits into
th0jensen:masterfrom
aohoyd:master
Open

Fix terminal editor in fg; Bump fff crates to 0.8#8
aohoyd wants to merge 2 commits into
th0jensen:masterfrom
aohoyd:master

Conversation

@aohoyd
Copy link
Copy Markdown
Contributor

@aohoyd aohoyd commented May 29, 2026

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 message

2026-05-29T07:48:21.073750Z  INFO main ThreadId(01) open_in_editor{path=/Users/aohoyd/Git/github.com/th0jensen/fff-gpui/src/text_field.rs goto=None}: fff_gpui::editor: opening file with editor editor="hx"

I've added detached mode to open it correctly in the terminal.

Also fff has gained some nice features (e.g .ignore support) in newer releases, so I've updated it too

aohoyd and others added 2 commits May 29, 2026 11:27
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>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant