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

Interaction between fuzzyfinder and subsequent STDIN usage #17

Closed
akerl-unpriv opened this issue Apr 15, 2020 · 3 comments
Closed

Interaction between fuzzyfinder and subsequent STDIN usage #17

akerl-unpriv opened this issue Apr 15, 2020 · 3 comments
Labels
bug Something isn't working

Comments

@akerl-unpriv
Copy link

Describe the bug

To reproduce

  1. Use this go code: https://gist.github.com/akerl-unpriv/d94d02cb21a333776d4ebaf2a24f8849
  2. go run main.go
  3. When prompted to make a select, make any selection from the fuzzy menu
  4. When prompted to enter text, type any text
  5. Hit enter.
  6. Type some more text.
  7. Hit enter again.

Expected behavior

You should never be able to make it to step 6/7; when you enter text at the prompt and hit enter, that text should be captured by ReadString. Instead, something seems to be interacting between Fuzzyfinder and STDIN, that causes the first text and newline to be swallowed.

Screenshots

Environment

  • OS: MacOS (tested on Catalina and Mojave)
  • Terminal: iTerm and native OSX Terminal, bash and zsh
  • go-fuzzyfinder version: v0.2.0
@akerl-unpriv akerl-unpriv added the bug Something isn't working label Apr 15, 2020
@akerl-unpriv
Copy link
Author

It seems like this may be linked to gdamore/tcell#194

@ktr0731
Copy link
Owner

ktr0731 commented Apr 19, 2020

Thank you for reporting the issue.
Just you said, it is caused by gdamore/tcell's bug reported at gdamore/tcell#194 because the issue doesn't happen when using nsf/termbox-go.
One way to avoid the issue is to reverting #8 temporarily. We don't add any features depend on gdamore/tcell, so I think we can replace it without any side-effects.

@ktr0731
Copy link
Owner

ktr0731 commented May 2, 2020

gdamore/tcell implementation has been reverted at v0.2.1.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants