---
lib/sup/message-chunks.rb | 5 ++---
1 files changed, 2 insertions(+), 3 deletions(-)
diff --git a/lib/sup/message-chunks.rb b/lib/sup/message-chunks.rb
index 1bf7796..a463fd4 100644
--- a/lib/sup/message-chunks.rb
+++ b/lib/sup/message-chunks.rb
@@ -41,7 +41,6 @@ end
module Redwood
module Chunk
- WRAP_LEN = 80 # wrap messages and text attachments at this width
class Attachment
HookManager.register "mime-decode", <<EOS
@@ -109,7 +108,7 @@ EOS
@lines = nil
if text
@lines = text.gsub("\r\n", "\n").gsub(/\t/, " ").gsub(/\r/,
"").split("\n")
- @lines = lines.map {|l| l.chomp.wrap WRAP_LEN}.flatten
+ @lines = lines.map {|l| l.chomp.wrap Ncurses.cols}.flatten
@quotable = true
end
end
@@ -161,7 +160,7 @@ EOS
attr_reader :lines
def initialize lines
- @lines = lines.map { |l| l.chomp.wrap WRAP_LEN }.flatten # wrap
+ @lines = lines.map { |l| l.chomp.wrap Ncurses.cols }.flatten # wrap
## trim off all empty lines except one
@lines.pop while @lines.length > 1 && @lines[-1] =~ /^\s*$/ &&
@lines[-2] =~ /^\s*$/
--
1.5.6.3
_______________________________________________
sup-talk mailing list
[email protected]
http://rubyforge.org/mailman/listinfo/sup-talk