Skip to content

Prevent cursor flickering in dancing ruby#1041

Merged
tompng merged 1 commit into
ruby:masterfrom
ima1zumi:easter-egg
Nov 30, 2024
Merged

Prevent cursor flickering in dancing ruby#1041
tompng merged 1 commit into
ruby:masterfrom
ima1zumi:easter-egg

Conversation

@ima1zumi

@ima1zumi ima1zumi commented Nov 30, 2024

Copy link
Copy Markdown
Member

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 Nov 30, 2024
Comment thread lib/irb/easter-egg.rb Outdated
end
end
ensure
print "\e[?25h" # show cursor

Copy link
Copy Markdown
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
Copy Markdown
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

@tompng tompng left a comment

Copy link
Copy Markdown
Member

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
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

3 participants