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

fix(stdin): Fix first input loss when running multiple times #41

Closed
wants to merge 3 commits into from

Conversation

mritd
Copy link

@mritd mritd commented Jan 11, 2021

Fix first input loss when running multiple times

fix #24

Signed-off-by: mritd mritd@linux.com

@mritd
Copy link
Author

mritd commented Jan 11, 2021

@meowgorithm This PR is checkout from v0.12.2, which is convenient for other users who use v0.12.2 to use it directly 😁.

mritd and others added 3 commits January 11, 2021 20:46
Fix first input loss when running multiple times

fix charmbracelet#24

Signed-off-by: mritd <mritd@linux.com>
add context to prevent goroutine leakage

see also charmbracelet#24

Signed-off-by: mritd <mritd@linux.com>
@meowgorithm
Copy link
Member

This is now up to date with master (via rebase). Apologies for the force push.

@mritd
Copy link
Author

mritd commented Jan 12, 2021

No problem, I try to re-reference this branch in my library 😁

@meowgorithm
Copy link
Member

Cool! If we don't reach a good conclusion on #24 in a few days I'll do a release on master, then another once we merge this PR.

mritd added a commit to mritd/bubbles that referenced this pull request Jan 12, 2021
see also charmbracelet/bubbletea#41

Signed-off-by: mritd <mritd@linux.com>
@meowgorithm
Copy link
Member

Hey @mritd 👋! Thanks again for contributing this PR. We've been holding off on merging it as we're concerned that the package-level variable isn't ideal. That said, we've just closed #57 which solves a similar problem by opening and closing a TTY for input. I think we can apply a similar solution here. I'll follow up in #24.

@mritd
Copy link
Author

mritd commented Feb 28, 2021

OK, I'll refer to code #57 to see if there are other solutions;Finally, I'm sorry I've been a little busy recently because of the Chinese New Year and all kinds of holidays.

@meowgorithm
Copy link
Member

@mritd Oh, no worries at all. And don't feel like you need to do anything. I just wanted to let you know we're still looking at a solution and wanted you to know we're still intending to sort this one out.

@mritd
Copy link
Author

mritd commented Mar 2, 2021

Ok, thank you. 😁

@erikgeiser
Copy link
Contributor

Here is another implementation to fix this: #120

@meowgorithm
Copy link
Member

Hey @mritd — just a note that this has been fixed by #120 which we just merged. So with that in mind, I'm going to close this PR. Thanks for your efforts on this one. 🍻

@meowgorithm
Copy link
Member

This functionality is now available in v0.16.0.

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.

Input is still read after program quits
3 participants