diff options
author | aycabta <aycabta@gmail.com> | 2021-08-28 02:25:57 +0900 |
---|---|---|
committer | aycabta <aycabta@gmail.com> | 2021-08-29 20:30:33 +0900 |
commit | 6273b9bb6207901fcd5fc6c0cb5ec97dbf0bc139 (patch) | |
tree | f64fe2c012f7ad27f81c23c080c2ff3b01b7becd /lib/reline.rb | |
parent | 3d757ba1b6acc624c56704d90747cb2814c22119 (diff) |
[ruby/reline] Use colored doc output with ANSI escape sequence
https://github.com/ruby/reline/commit/7d1c75b43f
Diffstat (limited to 'lib/reline.rb')
-rw-r--r-- | lib/reline.rb | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/reline.rb b/lib/reline.rb index b32d07bd25..cb51738958 100644 --- a/lib/reline.rb +++ b/lib/reline.rb @@ -243,11 +243,11 @@ module Reline end end return nil if doc.nil? - formatter = RDoc::Markup::ToBs.new + formatter = RDoc::Markup::ToAnsi.new formatter.width = 40 str = doc.accept(formatter) - [Reline::CursorPos.new(cursor_pos_to_render.x + 40, cursor_pos_to_render.y + pointer), str.split("\n"), nil, '40'] + [Reline::CursorPos.new(cursor_pos_to_render.x + 40, cursor_pos_to_render.y + pointer), str.split("\n"), nil, '49'] } def readmultiline(prompt = '', add_hist = false, &confirm_multiline_termination) |