From 4f5166e790d1154447deaaf42ed1cdd647dd6bcf Mon Sep 17 00:00:00 2001 From: aycabta Date: Tue, 31 Aug 2021 15:09:46 +0900 Subject: [PATCH] [ruby/reline] Check if dialog_render_info is nil or not https://github.com/ruby/reline/commit/e2b87fe831 --- lib/reline/line_editor.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/reline/line_editor.rb b/lib/reline/line_editor.rb index a42d9ae81d..b42b382e7d 100644 --- a/lib/reline/line_editor.rb +++ b/lib/reline/line_editor.rb @@ -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