diff options
author | aycabta <aycabta@gmail.com> | 2021-09-03 00:05:56 +0900 |
---|---|---|
committer | git <svn-admin@ruby-lang.org> | 2021-09-03 03:32:12 +0900 |
commit | f3fe3511da1ca37d92464c8cc3e2c163dae16017 (patch) | |
tree | 902f2fa80ac5b5fe4b13d6cfffa0e75dbec33d67 /lib | |
parent | 93080111cdb96b90f66ec6913e242eef45d7b49e (diff) |
[ruby/reline] Swap the order of initialization for readability
https://github.com/ruby/reline/commit/d53749b208
Diffstat (limited to 'lib')
-rw-r--r-- | lib/reline/line_editor.rb | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/reline/line_editor.rb b/lib/reline/line_editor.rb index 1aa0360393..4ed79ab797 100644 --- a/lib/reline/line_editor.rb +++ b/lib/reline/line_editor.rb @@ -605,14 +605,14 @@ class Reline::LineEditor return end old_dialog = dialog.clone + dialog.contents = dialog_render_info.contents + pointer = dialog_render_info.pointer if dialog_render_info.width dialog.width = dialog_render_info.width else - dialog.width = dialog_render_info.contents.map { |l| calculate_width(l, true) }.max + dialog.width = dialog.contents.map { |l| calculate_width(l, true) }.max end height = dialog_render_info.height || DIALOG_HEIGHT - pointer = dialog_render_info.pointer - dialog.contents = dialog_render_info.contents height = dialog.contents.size if dialog.contents.size < height if dialog.contents.size > height if dialog_render_info.pointer |