ruby-changes:67572
From: aycabta <ko1@a...>
Date: Fri, 3 Sep 2021 04:28:41 +0900 (JST)
Subject: [ruby-changes:67572] eb92d7c732 (master): [ruby/irb] Add message to show full doc
https://git.ruby-lang.org/ruby.git/commit/?id=eb92d7c732 From eb92d7c732959ab03deb0ed57aa3167fedb33f84 Mon Sep 17 00:00:00 2001 From: aycabta <aycabta@g...> Date: Fri, 3 Sep 2021 01:17:30 +0900 Subject: [ruby/irb] Add message to show full doc https://github.com/ruby/irb/commit/6370a5d974 --- lib/irb/input-method.rb | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lib/irb/input-method.rb b/lib/irb/input-method.rb index 915c8fd..a48e348 100644 --- a/lib/irb/input-method.rb +++ b/lib/irb/input-method.rb @@ -370,7 +370,8 @@ module IRB https://github.com/ruby/ruby/blob/trunk/lib/irb/input-method.rb#L370 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 -- cgit v1.1 -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/