[前][次][番号順一覧][スレッド一覧]

ruby-changes:67383

From: aycabta <ko1@a...>
Date: Tue, 31 Aug 2021 15:19:48 +0900 (JST)
Subject: [ruby-changes:67383] 4f5166e790 (master): [ruby/reline] Check if dialog_render_info is nil or not

https://git.ruby-lang.org/ruby.git/commit/?id=4f5166e790

From 4f5166e790d1154447deaaf42ed1cdd647dd6bcf Mon Sep 17 00:00:00 2001
From: aycabta <aycabta@g...>
Date: Tue, 31 Aug 2021 15:09:46 +0900
Subject: [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 a42d9ae..b42b382 100644
--- a/lib/reline/line_editor.rb
+++ b/lib/reline/line_editor.rb
@@ -589,7 +589,7 @@ class Reline::LineEditor https://github.com/ruby/ruby/blob/trunk/lib/reline/line_editor.rb#L589
     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
-- 
cgit v1.1


--
ML: ruby-changes@q...
Info: http://www.atdot.net/~ko1/quickml/

[前][次][番号順一覧][スレッド一覧]