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

Prevent cursor flickering in dancing ruby #1041

Merged
merged 1 commit into from
Nov 30, 2024
Merged

Conversation

ima1zumi
Copy link
Member

@ima1zumi ima1zumi commented Nov 30, 2024

Before

The cursor appears in the bottom right corner and occasionally flickers.

CleanShot.2024-12-01.at.00.49.00.mp4

After

CleanShot.2024-12-01.at.00.47.26.mp4

@ima1zumi ima1zumi marked this pull request as draft November 30, 2024 13:05
@ima1zumi ima1zumi marked this pull request as ready for review November 30, 2024 15:50
@ima1zumi ima1zumi changed the title Prevent cursor flickering Prevent cursor flickering in dancing ruby Nov 30, 2024
@@ -142,6 +143,7 @@ def render_frame(i)
end
end
ensure
print "\e[?25h" # show cursor
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

print "\e[?25l" is written inside STDOUT.cooked do end how about move this to the ensure statement of STDOUT.cooked do ensure end?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good point, I've fixed it.

@st0012 st0012 added the bug Something isn't working label Nov 30, 2024
Copy link
Member

@tompng tompng left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💎

@tompng tompng merged commit 0506ed0 into ruby:master Nov 30, 2024
30 checks passed
matzbot pushed a commit to ruby/ruby that referenced this pull request Nov 30, 2024
@ima1zumi ima1zumi deleted the easter-egg branch November 30, 2024 16:23
@ima1zumi ima1zumi restored the easter-egg branch November 30, 2024 16:48
@ima1zumi ima1zumi deleted the easter-egg branch November 30, 2024 16:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Development

Successfully merging this pull request may close these issues.

3 participants