diff options
author | aycabta <aycabta@gmail.com> | 2021-09-03 01:17:30 +0900 |
---|---|---|
committer | git <svn-admin@ruby-lang.org> | 2021-09-03 04:28:32 +0900 |
commit | eb92d7c732959ab03deb0ed57aa3167fedb33f84 (patch) | |
tree | 6dd9314f472c0a2a2a6c36e99ad5c266f9123a19 /lib | |
parent | f793f682641030da81a45f5a9a0f3191f79a75c2 (diff) | |
download | ruby-eb92d7c732959ab03deb0ed57aa3167fedb33f84.tar.gz |
[ruby/irb] Add message to show full doc
https://github.com/ruby/irb/commit/6370a5d974
Diffstat (limited to 'lib')
-rw-r--r-- | lib/irb/input-method.rb | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/irb/input-method.rb b/lib/irb/input-method.rb index 915c8fd075..a48e348732 100644 --- a/lib/irb/input-method.rb +++ b/lib/irb/input-method.rb @@ -370,7 +370,8 @@ module IRB formatter = RDoc::Markup::ToAnsi.new formatter.width = width dialog.trap_key = alt_d - contents = doc.accept(formatter).split("\n") + message = 'Press Alt+d to read the full document' + contents = [message] + doc.accept(formatter).split("\n") x = cursor_pos_to_render.x + autocomplete_dialog.width x = cursor_pos_to_render.x - width if x + width >= screen_width |