From bd9804cb0e08f03af29b25e830f033a2389ae779 Mon Sep 17 00:00:00 2001 From: Conrad Irwin Date: Thu, 29 Nov 2012 09:53:01 -0800 Subject: [PATCH] Handle case where maximum_width > screen_width --- lib/pry/commands/ls.rb | 1 + 1 file changed, 1 insertion(+) diff --git a/lib/pry/commands/ls.rb b/lib/pry/commands/ls.rb index 77741b72..5490b083 100644 --- a/lib/pry/commands/ls.rb +++ b/lib/pry/commands/ls.rb @@ -295,6 +295,7 @@ class Pry things = things.compact screen_width = TerminalInfo.screen_size[1] maximum_width = things.map{|t| Pry::Helpers::Text.strip_color(t).length}.max + Pry.config.ls.separator.length + maximum_width = screen_width if maximum_width > screen_width columns = screen_width / maximum_width things.each_slice(columns).map do |slice|