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

Update read_line behaviour to read_line_initial_text #181

Merged
merged 1 commit into from
Jan 9, 2024

Conversation

thibmeu
Copy link
Contributor

@thibmeu thibmeu commented Aug 9, 2023

term.read_line() is not using the declared term to request the input. It relies on stdin. This is not the case of term.read_line_initial_text(""), which reads key one by one using self.read_key().

This commits corrects this behaviour, and removes divergence between the two methods.

If read_line and read_line_initial_text are meant to have a different behaviour, their documentation needs to be updated. I'd be glad to update this PR if that's the case.

`term.read_line()` is not using the declared term to request the input. It relies on stdin.
This is not the case of `term.read_line_initial_text("")`, which reads key one by one using `self.read_key()`.

This commits corrects this behaviour, and removes divergence between the two methods.
@thibmeu
Copy link
Contributor Author

thibmeu commented Aug 22, 2023

@mitsuhiko tagging you for review as you've been the last one to merge changes.

@mitsuhiko mitsuhiko merged commit 50ccfcd into console-rs:master Jan 9, 2024
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.

2 participants