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

Expose cursor position of InputField #64

Merged
merged 3 commits into from
Oct 10, 2024
Merged

Expose cursor position of InputField #64

merged 3 commits into from
Oct 10, 2024

Conversation

xubaiwang
Copy link
Contributor

Exposing cursor position of InputField would be useful for cursor recovery cases like Canop/broot#948 .

In this PR, InputField::display_on and InputField::display are adjusted to have return type Result<Option<(u16, u16)>, _>.

Case Return Value
Cursor rendered at (left, top) Ok(Some((left, top)))
Cursor not rendered Ok(None)

src/views/input_field.rs Outdated Show resolved Hide resolved
@Canop
Copy link
Owner

Canop commented Oct 8, 2024

You'll tell me when you think the PR is ready for review / merge

@xubaiwang
Copy link
Contributor Author

I think this PR is ready for review.

@Canop Canop merged commit 8e0d24d into Canop:main Oct 10, 2024
2 checks passed
@Canop
Copy link
Owner

Canop commented Oct 10, 2024

merged. Thanks.

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