Skip to content

Commit

Permalink
[ruby/reline] Check if dialog_render_info is nil or not
Browse files Browse the repository at this point in the history
  • Loading branch information
aycabta authored and matzbot committed Aug 31, 2021
1 parent c8a07a1 commit 4f5166e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/reline/line_editor.rb
Expand Up @@ -589,7 +589,7 @@ def add_dialog_proc(name, p, context = nil)
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
Expand Down

0 comments on commit 4f5166e

Please sign in to comment.