sup

A curses threads-with-tags style email client

sup.git

git clone https://supmua.dev/git/sup/
commit 00c8a4ae9c986ff7455de3fb88b419f8293befb5
parent e3df7b775de899f9f49ef324249fab9e2859359f
Author: William Morgan <wmorgan-sup@masanjin.net>
Date:   Sat, 30 May 2009 17:14:34 -0700

utf8 bugfix: clear lines correctly

String#display_length must be used when clearing to the right of lines.

Diffstat:
M lib/sup/buffer.rb | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/lib/sup/buffer.rb b/lib/sup/buffer.rb
@@ -110,8 +110,9 @@ class Buffer
     s ||= ""
     maxl = @width - x
     @w.mvaddstr y, x, s[0 ... maxl]
-    unless s.length >= maxl || opts[:no_fill]
-      @w.mvaddstr(y, x + s.length, " " * (maxl - s.length))
+    l = s.display_length
+    unless l >= maxl || opts[:no_fill]
+      @w.mvaddstr(y, x + l, " " * (maxl - l))
     end
   end