 +        {
 +          struct mline *ml = &p->w_mlines[y];
 +          x = 0;
-+          if( st && (y == STATLINE) )
-+            for( ; x<p->w_width; *d++ = 0X70, x++ );
 +          for( ; x<p->w_width; x++ )
 +            {
 +              static const unsigned char tr[] =

 	timeoutev = calctimo();
       if (timeoutev)
--- window.c.orig	2003-12-05 08:45:41.000000000 -0500
+++ window.c	2006-07-30 10:37:53.000000000 -0400
@@ -1993,6 +1993,115 @@
     }
 }
 

+  register unsigned char *s, *d = dest, *m;
+  register int x, y;
+  struct display *display = p->w_lastdisp;
+  int st = (display && D_status) ? 1 : 0;
+
+  if( p && p->w_mlines )
+    {
+      *d++ = p->w_width;                        /* screen width */
+      *d++ = p->w_height + st;                  /* screen height */
+      *d++ = (st) ? D_status_len : p->w_x;      /* cursor column */
+      *d++ = (st) ? p->w_height : p->w_y;       /* cursor row */
+
+      /* copy window image to buffer */
+      for( y = 0; y < p->w_height; y++ )
+        {
+          s = p->w_mlines[y].image;
+          x = p->w_width;
+          for( ; x; *d++ = *s++, x-- );
+        }
+
+      /* copy status line to buffer */
+      if( st )
+        {
+          s = D_status_lastmsg;
+          x = p->w_width;
+          for( ; *s && x; *d++ = *s++, x-- );
+          for( ; x; *d++ = ' ', x-- );
+        }
+
+      /* copy attributes from window image to buffer */
