Skip to content

Commit

Permalink
Move access to dialog_render_info inside nil check
Browse files Browse the repository at this point in the history
  • Loading branch information
aycabta committed Aug 31, 2021
1 parent a75f384 commit 64373a3
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/reline/line_editor.rb
Expand Up @@ -589,9 +589,9 @@ 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 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?
dialog.width = dialog_render_info.width if dialog_render_info.width
height = dialog_render_info.height || DIALOG_HEIGHT
pointer = dialog_render_info.pointer
dialog.contents = dialog_render_info.contents
Expand Down

0 comments on commit 64373a3

Please sign in to comment.