diff options
-rw-r--r-- | lib/reline/line_editor.rb | 9 |
1 files changed, 1 insertions, 8 deletions
diff --git a/lib/reline/line_editor.rb b/lib/reline/line_editor.rb index 62965d0662..6bcfb4b5cc 100644 --- a/lib/reline/line_editor.rb +++ b/lib/reline/line_editor.rb @@ -136,14 +136,7 @@ class Reline::LineEditor end private def calculate_height_by_width(width) - return 1 if width.zero? - height = 1 - max_width = @screen_size.last - while width > max_width * height - height += 1 - end - height += 1 if (width % max_width).zero? - height + width.div(@screen_size.last) + 1 end private def split_by_width(prompt, str, max_width) |