lib/sup/modes/thread_view_mode.rb in sup-0.13.2.1 vs lib/sup/modes/thread_view_mode.rb in sup-0.14.0
- old
+ new
@@ -844,9 +844,13 @@
if config_width and config_width != 0
width = [config_width, buffer.content_width].min
else
width = buffer.content_width
end
+ # lines can apparently be both String and Array, convert to Array for map.
+ if lines.kind_of? String
+ lines = lines.lines.to_a
+ end
lines = lines.map { |l| l.chomp.wrap width if l }.flatten
end
return lines
end