Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion lib/irb/easter-egg.rb
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,6 @@ def render_frame(i)
canvas = Canvas.new(Reline.get_screen_size)
end
ruby_model = RubyModel.new
print "\e[?1049h"
0.step do |i| # TODO (0..).each needs Ruby 2.6 or later
buff = canvas.draw do
ruby_model.render_frame(i) do |p1, p2|
Expand Down
6 changes: 6 additions & 0 deletions lib/irb/input-method.rb
Original file line number Diff line number Diff line change
Expand Up @@ -361,9 +361,15 @@ def show_doc_dialog_proc
if show_easter_egg
IRB.__send__(:easter_egg)
else
# RDoc::RI::Driver#display_names uses pager command internally.
# Some pager command like `more` doesn't use alternate screen
# so we need to turn on and off alternate screen manually.
begin
print "\e[?1049h"
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.

Is this something we want ri to do most of the time as well?

driver.display_names([name])
rescue RDoc::RI::Driver::NotFoundError
ensure
print "\e[?1049l"
end
end
end
Expand Down