ruby-changes:68397
From: Nobuyoshi <ko1@a...>
Date: Tue, 12 Oct 2021 13:19:38 +0900 (JST)
Subject: [ruby-changes:68397] 1009fd7ee3 (master): [ruby/reline] Revert "Fix zero division when the screen width is not available"
https://git.ruby-lang.org/ruby.git/commit/?id=1009fd7ee3 From 1009fd7ee3d04c5cc4ca4a8b523a6d4d56a0da88 Mon Sep 17 00:00:00 2001 From: Nobuyoshi Nakada <nobu@r...> Date: Tue, 12 Oct 2021 10:05:58 +0900 Subject: [ruby/reline] Revert "Fix zero division when the screen width is not available" This reverts commit 0dce9da083541f42c31822a91c72f339934c3986. https://github.com/ruby/reline/commit/f71471cdde --- 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 c1bb49033a..f6facc9da8 100644 --- a/lib/reline/line_editor.rb +++ b/lib/reline/line_editor.rb @@ -340,8 +340,7 @@ class Reline::LineEditor https://github.com/ruby/ruby/blob/trunk/lib/reline/line_editor.rb#L340 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) -- cgit v1.2.1 -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/