sup

A curses threads-with-tags style email client

sup.git

git clone https://supmua.dev/git/sup/
commit ab791ab8e479058480d22401c1b014ade33ab9d5
parent a34f60e4c5a56f348323e788730504fe2cfc9767
Author: Gaute Hope <eg@gaute.vetsj.com>
Date:   Wed, 12 Mar 2014 14:27:30 +0100

util: comment on fall back

Diffstat:
M lib/sup/util.rb | 3 +++
1 file changed, 3 insertions(+), 0 deletions(-)
diff --git a/lib/sup/util.rb b/lib/sup/util.rb
@@ -267,6 +267,9 @@ end
 class String
   def display_length
     @display_length ||= Unicode.width(self.fix_encoding!, false)
+
+    # if Unicode.width fails and returns -1, fall back to
+    # regular String#length, see pull-request: #256.
     if @display_length < 0
       @display_length = self.length
     end