Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Initial scratch buffer is discarded when non-empty and unmodified #3305

Closed
the-mikedavis opened this issue Aug 2, 2022 · 1 comment · Fixed by #7431
Closed

Initial scratch buffer is discarded when non-empty and unmodified #3305

the-mikedavis opened this issue Aug 2, 2022 · 1 comment · Fixed by #7431
Labels
A-helix-term Area: Helix term improvements C-bug Category: This is a bug

Comments

@the-mikedavis
Copy link
Member

the-mikedavis commented Aug 2, 2022

Summary

The initial scratch buffer created when opening hx without a filename may be erroneously closed when navigated away from. This is expected behavior when the scratch buffer is empty and unmodified but it can occur when the scratch buffer is non-empty and unmodified by piping in initial text.

#3118

Reproduction Steps

Fill the initial scratch buffer with files for example

find . -name \*.md | hx

Then use gf to open up one of those buffers. The buffer picker (Space-b) then shows

If you leave some modifications in the scratch buffer before using gf then the scratch buffer stays open.

(This is not reproducible on macos because piping in is not currently supported

anyhow::bail!("Piping into helix-term is currently not supported on macOS");
)

Helix log

No response

Platform

Linux (NixOS 21.11)

Terminal Emulator

Kitty 0.25.2

Helix Version

22.05-351-g69f84e25

@tamakiii
Copy link

I'd like to use this feature too, but as an alternative, process substitution works.

hx <(find . -name \*.md)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-helix-term Area: Helix term improvements C-bug Category: This is a bug
Projects
None yet
2 participants