Fix screen width

Allow interface to use full screen width, while being at least 80 characters wide
This commit is contained in:
Eric Budd 2018-01-31 00:25:52 -05:00
parent 854dddb008
commit e5743e6562
1 changed files with 2 additions and 1 deletions

View File

@ -299,7 +299,8 @@ class Message
end
class Display
WIDTH = 80
MIN_WIDTH = 80
WIDTH = [ENV['COLUMNS'].to_i, `tput cols`.chomp.to_i, MIN_WIDTH].compact.max
def self.topic_index_width
Corpus.topics.size.to_s.length