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

Creating a buffer with :new overwrites existing scratch buffer if read from stdin #5243

Closed
yonatan8070 opened this issue Dec 21, 2022 · 2 comments
Labels
C-bug Category: This is a bug R-duplicate Duplicated issue: please refer to the linked issue

Comments

@yonatan8070
Copy link

Summary

When piping data into helix via stdin (echo "..." | hx) and the creating a new buffer via :new (without writing the first buffer), the data from the first buffer will be deleted.

I noticed that if I modify the stdin buffer before using :new it does not get deleted, I'm assuming this is because before it's modified it is wrongly considered an empty buffer, since I also noticed that :q works without prompting to save the buffer before leaving.

Reproduction Steps

I tried this:

  1. echo "Hello, world!" | hx
  2. :new

I expected this to happen:
A new scratch buffer is created alongside the data from stdin.

Instead, this happened:
The buffer created from stdin was deleted and a new scratch buffer replaced it.

Helix log

There was nothing written to the log during my testing.

Platform

Linux

Terminal Emulator

Konsole

Helix Version

22.12

@yonatan8070 yonatan8070 added the C-bug Category: This is a bug label Dec 21, 2022
@the-mikedavis
Copy link
Member

Duplicate of #3305

@the-mikedavis the-mikedavis marked this as a duplicate of #3305 Dec 21, 2022
@the-mikedavis the-mikedavis closed this as not planned Won't fix, can't repro, duplicate, stale Dec 21, 2022
@the-mikedavis the-mikedavis added the R-duplicate Duplicated issue: please refer to the linked issue label Dec 21, 2022
@yonatan8070
Copy link
Author

My bad, didn't see this was a duplicate

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C-bug Category: This is a bug R-duplicate Duplicated issue: please refer to the linked issue
Projects
None yet
Development

No branches or pull requests

2 participants