Allow piping from stdin into a buffer on startup - #996
Merged
Conversation
kirawi
reviewed
Nov 6, 2021
| let id = DocumentId(self.next_document_id); | ||
| self.next_document_id += 1; | ||
| let mut doc = Document::default(); | ||
| let mut doc = if stdin().is_tty() { |
Member
There was a problem hiding this comment.
I don't think we want it to be in this function, I think it would make more sense for it to be in helix-term/src/application.rs::Application::new()
It did make me think of potentially opening new files that were piped from an application via :n "<shell stuff>" as a shortcut to creating a new file and directly piping it like that. @archseer
Contributor
Author
|
I tested this on Linux, Windows, and macOS. It works on Linux and Windows, but unfortunately not on macOS. It might be a bug in Here's the panic message: |
Contributor
Author
|
Looks like there's an open issue for the macOS problem I'm seeing. |
Member
|
Conditionally disabling on MacOS might make sense right now. |
archseer
requested changes
Nov 7, 2021
Co-authored-by: Blaž Hrastnik <blaz@mxxn.io>
Co-authored-by: Blaž Hrastnik <blaz@mxxn.io>
archseer
approved these changes
Nov 10, 2021
EbbDrop
pushed a commit
to EbbDrop/helix
that referenced
this pull request
Nov 11, 2021
* Allow piping from stdin into a buffer on startup * Refactor * Don't allow piping into new buffer on macOS * Update helix-term/src/application.rs Co-authored-by: Blaž Hrastnik <blaz@mxxn.io> * Update helix-term/src/application.rs Co-authored-by: Blaž Hrastnik <blaz@mxxn.io> * Fix Co-authored-by: Blaž Hrastnik <blaz@mxxn.io>
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.
Closes #927