Correctly pad the caption output.
authorGuo Rui <firemeteor@Adam.(none)>
Tue, 21 Jul 2009 16:29:47 +0000 (22 00:29 +0800)
committerGuo Rui <firemeteor@Adam.(none)>
Tue, 21 Jul 2009 16:29:47 +0000 (22 00:29 +0800)
src/lua.c

index 43c412f..365d884 100644 (file)
--- a/src/lua.c
+++ b/src/lua.c
@@ -656,6 +656,9 @@ canvas_update_caption(lua_State *L)
   if (l > cv->c_xe - cv->c_xs + 1)
     l = cv->c_xe - cv->c_xs + 1;
   PutWinMsg(buf, cv->c_xs, l);
+  l += cv->c_xs;
+  for (; l <= cv->c_xe; l++)
+    PUTCHARLP(' ');
 
   return 0;
 }