diff options
author | james <> | 2008-02-13 16:59:34 +0000 |
---|---|---|
committer | james <> | 2008-02-13 16:59:34 +0000 |
commit | 4d30d1456ad4052bd5d5bbec8cd7dbaad233c7a5 (patch) | |
tree | 8a6d64fa375f577cc34d5ef2b6e330d84013cf36 /src/vt102.c | |
parent | e32ce0cfdccf5240ae29ef06a13078ae37ee521a (diff) | |
download | sympathy-4d30d1456ad4052bd5d5bbec8cd7dbaad233c7a5.tar.gz sympathy-4d30d1456ad4052bd5d5bbec8cd7dbaad233c7a5.tar.bz2 sympathy-4d30d1456ad4052bd5d5bbec8cd7dbaad233c7a5.zip |
*** empty log message ***
Diffstat (limited to 'src/vt102.c')
-rw-r--r-- | src/vt102.c | 24 |
1 files changed, 21 insertions, 3 deletions
diff --git a/src/vt102.c b/src/vt102.c index a8d4388..df7b6b1 100644 --- a/src/vt102.c +++ b/src/vt102.c @@ -10,6 +10,9 @@ static char rcsid[] = "$Id$"; /* * $Log$ + * Revision 1.25 2008/02/13 16:57:29 james + * *** empty log message *** + * * Revision 1.24 2008/02/13 09:12:21 james * *** empty log message *** * @@ -264,6 +267,18 @@ vt102_log_line (Context * c, int line) c->l->log (c->l, logbuf); } +/*Called for every upward scroll with same args*/ +void +vt102_history (Context * c, CRT_Pos t, CRT_Pos b) +{ +/*Only log if it scrolls off the top*/ + if (t.y) + return; + + t.x = 0; + history_add (c->h, &(c->v->crt.screen[CRT_ADDR_POS (&t)])); +} + void vt102_clip_cursor (VT102 * v, CRT_Pos tl, CRT_Pos br) { @@ -314,7 +329,9 @@ vt102_cursor_advance_line (Context * c) (couldscroll)) { vt102_log_line (c, v->pos.y); - //FIXME call out to history + + vt102_history (c, v->top_margin, v->bottom_margin); + crt_scroll_up (&v->crt, v->top_margin, v->bottom_margin, 1); return; } @@ -776,6 +793,7 @@ vt102_parse_esc (Context * c, int ch) if (v->pos.y == v->bottom_margin.y) { vt102_log_line (c, v->pos.y); + vt102_history (c, v->top_margin, v->bottom_margin); crt_scroll_up (&v->crt, v->top_margin, v->bottom_margin, 1); } else @@ -938,8 +956,8 @@ vt102_parse_csi (Context * c, char *buf, int len) { while (narg--) { - //FIXME call out to history - crt_scroll_up (&v->crt, v->pos, v->bottom_margin, 0); + vt102_history (c, v->pos, v->bottom_margin); + crt_scroll_up (&v->crt, v->pos, v->bottom_margin, 1); } } break; |