From 6273b9bb6207901fcd5fc6c0cb5ec97dbf0bc139 Mon Sep 17 00:00:00 2001 From: aycabta Date: Sat, 28 Aug 2021 02:25:57 +0900 Subject: [PATCH] [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 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)