sup

A curses threads-with-tags style email client

sup.git

git clone https://supmua.dev/git/sup/
commit 8fae63c082ef4cb03d847ae1f9de04f3a79e20e3
parent fc58bbb5a1d000022bd0b571abc37280e3217b2d
Author: Rich Lane <rlane@club.cc.cmu.edu>
Date:   Thu, 13 May 2010 18:57:53 -0700

Merge branch 'master' into next

Diffstat:
M lib/sup/buffer.rb | 10 ++++------
1 file changed, 4 insertions(+), 6 deletions(-)
diff --git a/lib/sup/buffer.rb b/lib/sup/buffer.rb
@@ -130,15 +130,13 @@ class Buffer
     s ||= ""
     maxl = @width - x # maximum display width width
     stringl = maxl    # string "length"
+
+    # fill up the line with blanks to overwrite old screen contents
+    @w.mvaddstr y, x, " " * maxl unless opts[:no_fill]
+
     ## the next horribleness is thanks to ruby's lack of widechar support
     stringl += 1 while stringl < s.length && s[0 ... stringl].display_length < maxl
     @w.mvaddstr y, x, s[0 ... stringl]
-    unless opts[:no_fill]
-      l = s.display_length
-      unless l >= maxl
-        @w.mvaddstr(y, x + l, " " * (maxl - l))
-      end
-    end
   end
 
   def clear