зеркало из https://github.com/github/ruby.git
[ruby/reline] Swap the order of initialization for readability
https://github.com/ruby/reline/commit/d53749b208
This commit is contained in:
Родитель
93080111cd
Коммит
f3fe3511da
|
@ -605,14 +605,14 @@ class Reline::LineEditor
|
|||
return
|
||||
end
|
||||
old_dialog = dialog.clone
|
||||
dialog.contents = dialog_render_info.contents
|
||||
pointer = dialog_render_info.pointer
|
||||
if dialog_render_info.width
|
||||
dialog.width = dialog_render_info.width
|
||||
else
|
||||
dialog.width = dialog_render_info.contents.map { |l| calculate_width(l, true) }.max
|
||||
dialog.width = dialog.contents.map { |l| calculate_width(l, true) }.max
|
||||
end
|
||||
height = dialog_render_info.height || DIALOG_HEIGHT
|
||||
pointer = dialog_render_info.pointer
|
||||
dialog.contents = dialog_render_info.contents
|
||||
height = dialog.contents.size if dialog.contents.size < height
|
||||
if dialog.contents.size > height
|
||||
if dialog_render_info.pointer
|
||||
|
|
Загрузка…
Ссылка в новой задаче