From f71471cdde7606fb77e1c3149430dbbf5334927d Mon Sep 17 00:00:00 2001 From: Nobuyoshi Nakada Date: Tue, 12 Oct 2021 10:05:58 +0900 Subject: [PATCH] Revert "Fix zero division when the screen width is not available" This reverts commit 0dce9da083541f42c31822a91c72f339934c3986. --- lib/reline/line_editor.rb | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/lib/reline/line_editor.rb b/lib/reline/line_editor.rb index e00458bba5..4c777479cd 100644 --- a/lib/reline/line_editor.rb +++ b/lib/reline/line_editor.rb @@ -340,8 +340,7 @@ def multiline_off end private def calculate_height_by_width(width) - max_width = @screen_size.last - max_width > 0 ? (width.div(max_width) + 1) : 1 + width.div(@screen_size.last) + 1 end private def split_by_width(str, max_width)