зеркало из https://github.com/github/ruby.git
[ruby/reline] Use colored doc output with ANSI escape sequence
https://github.com/ruby/reline/commit/7d1c75b43f
This commit is contained in:
Родитель
3d757ba1b6
Коммит
6273b9bb62
|
@ -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)
|
||||
|
|
Загрузка…
Ссылка в новой задаче