Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Move the blocking check to the read method. #17

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

Open
tbannister wants to merge 1 commit into php-school:master
base: master
Choose a base branch
Loading
from tbannister:fix-paste

Conversation

@tbannister
Copy link

@tbannister tbannister commented Jan 16, 2023

Move the stream_get_meta_data check into the read function to always restore the original status.

Also to prevent unnecessary looping/screen flicker, turn blocking off only when there is data in the internal stream buffer.

bozhinov reacted with thumbs up emoji
Move the stream_get_meta_data check into the read function to
always restore the original status.
Also to prevent unnecessary looping/screen flicker, turn
blocking off only when there is data in the internal stream
buffer.
Copy link
Author

The __destruct call wasn't always restoring the blocking status in practice, so I've changed the approach, and it should now both fix the pasting issue and leave the blocking status unchanged.

Technically we're not supposed to use unread_bytes to check for more data, but that appears to be exactly what we need to be checking to handle the paste situation. The problem isn't waiting for more data to be read from input, it's forcing the buffered data to be handled without waiting for new input.

Copy link
Member

Sorry @tbannister I missed this - is it still needed? If so, could you maybe rebase?

Copy link

Thank you @tbannister That actually solved the bug the I had with the redraw

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

No reviews

Assignees

No one assigned

Labels

None yet

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

AltStyle によって変換されたページ (->オリジナル) /