1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

[ruby/reline] Check if dialog_render_info is nil or not

https://github.com/ruby/reline/commit/e2b87fe831
This commit is contained in:
aycabta 2021-08-31 15:09:46 +09:00 committed by git
parent c8a07a1231
commit 4f5166e790

View file

@ -589,7 +589,7 @@ class Reline::LineEditor
end
dialog.set_cursor_pos(cursor_column, @first_line_started_from + @started_from)
dialog_render_info = dialog.call
dialog.width = dialog_render_info.width if dialog_render_info.width
dialog.width = dialog_render_info.width if dialog_render_info and dialog_render_info.width
old_dialog = dialog.clone
if dialog_render_info and dialog_render_info.contents and not dialog_render_info.contents.empty?
height = dialog_render_info.height || DIALOG_HEIGHT