]> git.cworth.org Git - sup/commitdiff
more display_length changes
authorWilliam Morgan <wmorgan-sup@masanjin.net>
Wed, 20 May 2009 01:04:13 +0000 (18:04 -0700)
committerWilliam Morgan <wmorgan-sup@masanjin.net>
Wed, 20 May 2009 01:04:13 +0000 (18:04 -0700)
lib/sup/modes/edit-message-mode.rb
lib/sup/modes/thread-view-mode.rb

index d423d91a185d99e0adfee072412efba8f0e00d2a..08b9fd259742cff252f837eece867f8337a953a7 100644 (file)
@@ -283,7 +283,7 @@ protected
           if i == 0
             header + " " + name
           else
-            (" " * (header.length + 1)) + name
+            (" " * (header.display_length + 1)) + name
           end + (i == things.length - 1 ? "" : ",")
         end
       end
index f27f00d81ec28bb7563dac53e2ccfd406ae93e2f..e6bd1597a236422e38de46e01241882eab284a00 100644 (file)
@@ -540,7 +540,7 @@ private
       (0 ... text.length).each do |i|
         @chunk_lines[@text.length + i] = m
         @message_lines[@text.length + i] = m
-        lw = text[i].flatten.select { |x| x.is_a? String }.map { |x| x.length }.sum
+        lw = text[i].flatten.select { |x| x.is_a? String }.map { |x| x.display_length }.sum
       end
 
       @text += text
@@ -561,7 +561,7 @@ private
           (0 ... text.length).each do |i|
             @chunk_lines[@text.length + i] = c
             @message_lines[@text.length + i] = m
-            lw = text[i].flatten.select { |x| x.is_a? String }.map { |x| x.length }.sum - (depth * INDENT_SPACES)
+            lw = text[i].flatten.select { |x| x.is_a? String }.map { |x| x.display_length }.sum - (depth * INDENT_SPACES)
             l.width = lw if lw > l.width
           end
           @text += text
@@ -635,7 +635,7 @@ private
 
   def format_person_list prefix, people
     ptext = people.map { |p| format_person p }
-    pad = " " * prefix.length
+    pad = "." * prefix.display_length
     [prefix + ptext.first + (ptext.length > 1 ? "," : "")] + 
       ptext[1 .. -1].map_with_index do |e, i|
         pad + e + (i == ptext.length - 1 ? "" : ",")