void vt_scrdn() { W *w; if ((w = maint->topwin) != NULL) { do { if (w->watom->what & TYPETW) { BW *bw = (BW *)w->object; if (bw->shell_flag) { pnextl(bw->top); if (bw->parent->y != -1) nscrlup(bw->parent->t->t, bw->y, bw->y + bw->h, 1); } } w = w->link.next; } while (w != maint->topwin); } }
static void movetw(W *w, ptrdiff_t x, ptrdiff_t y) { BW *bw = (BW *)w->object; TW *tw = (TW *)bw->object; if (y || !staen) { if (!tw->staon) { /* Scroll down and shrink */ nscrldn(bw->parent->t->t, y, bw->parent->nh + y, 1); } bwmove(bw, x + (bw->o.linums ? LINCOLS : 0), y + 1); tw->staon = 1; } else { if (tw->staon) { /* Scroll up and grow */ nscrlup(bw->parent->t->t, y, bw->parent->nh + y, 1); } bwmove(bw, x + (bw->o.linums ? LINCOLS : 0), y); tw->staon = 0; } }