chiark / gitweb /
*** empty log message ***
[sympathy.git] / src / vt102.c
index d94bc4d92d1a0946a7f6aa922cb2fd706ca3294a..1d3709bcbb87a0fe02714fbfe502094fcb45a9cf 100644 (file)
@@ -10,6 +10,9 @@ static char rcsid[] = "$Id$";
 
 /*
  * $Log$
+ * Revision 1.51  2008/02/28 16:37:16  james
+ * *** empty log message ***
+ *
  * Revision 1.50  2008/02/28 12:12:25  james
  * *** empty log message ***
  *
@@ -399,7 +402,23 @@ in_margins (VT102 * v, CRT_Pos p)
 
   return 1;
 }
+void   vt102_crt_update(Context *c)
+{
+VT102 *v=c->v;
+
+  v->crt.pos = v->pos;
+  v->crt.hide_cursor =
+    v->private_modes[VT102_PRIVATE_MODE_SHOW_CURSOR] ? 0 : 1;
+
+  if (v->current_line.y != v->pos.y)
+    {
+      vt102_log_line (c, v->current_line.y);
+      v->current_line = v->pos;
+    }
 
+  if (c->d)
+    cmd_show_status (c->d, c);
+}
 void vt102_do_resize(Context *c)
 {
 
@@ -417,6 +436,9 @@ VT102 *v=c->v;
 
          if (c->t)
                tty_winch(c->t,v->current_size);
+
+       log_f(c->l,"<size now %dx%d>", v->current_size.x,v->current_size.y);
+vt102_crt_update(c);
 }
 
 
@@ -1834,18 +1856,9 @@ vt102_parse_char (Context * c, int ch)
 #endif
     }
 
-  v->crt.pos = v->pos;
-  v->crt.hide_cursor =
-    v->private_modes[VT102_PRIVATE_MODE_SHOW_CURSOR] ? 0 : 1;
+  vt102_crt_update(c);
 
-  if (v->current_line.y != v->pos.y)
-    {
-      vt102_log_line (c, v->current_line.y);
-      v->current_line = v->pos;
-    }
 
-  if (c->d)
-    cmd_show_status (c->d, c);
 }
 
 void
@@ -2092,9 +2105,10 @@ vt102_set_ansi (VT102 * v, int ansi)
 
 void vt102_resize(Context *c,CRT_Pos size)
 {
+       log_f(c->l,"<size change to %dx%d requested>", size.x,size.y);
 
        if (!size.x) size.x=c->v->current_size.x;
-       if (!size.y) size.x=c->v->current_size.y;
+       if (!size.y) size.y=c->v->current_size.y;
 
       if (size.x < 1)
         size.x = 1;