Skip to content

Commit

Permalink
Revert "Fix zero division when the screen width is not available"
Browse files Browse the repository at this point in the history
This reverts commit 0dce9da.
  • Loading branch information
nobu committed Oct 12, 2021
1 parent 94c0987 commit f71471c
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions lib/reline/line_editor.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit f71471c

Please sign in to comment.