ruby-changes:67323
From: aycabta <ko1@a...>
Date: Sun, 29 Aug 2021 20:31:09 +0900 (JST)
Subject: [ruby-changes:67323] 6273b9bb62 (master): [ruby/reline] Use colored doc output with ANSI escape sequence
https://git.ruby-lang.org/ruby.git/commit/?id=6273b9bb62 From 6273b9bb6207901fcd5fc6c0cb5ec97dbf0bc139 Mon Sep 17 00:00:00 2001 From: aycabta <aycabta@g...> Date: Sat, 28 Aug 2021 02:25:57 +0900 Subject: [ruby/reline] Use colored doc output with ANSI escape sequence https://github.com/ruby/reline/commit/7d1c75b43f --- lib/reline.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/reline.rb b/lib/reline.rb index b32d07b..cb51738 100644 --- a/lib/reline.rb +++ b/lib/reline.rb @@ -243,11 +243,11 @@ module Reline https://github.com/ruby/ruby/blob/trunk/lib/reline.rb#L243 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) -- cgit v1.1 -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/