reflow: fix displaying history on vertical expansion

This commit is contained in:
Boris Faure 2013-04-07 23:16:32 +02:00
parent b749acfc3c
commit ce65369d57
1 changed files with 4 additions and 2 deletions

View File

@ -727,7 +727,7 @@ _termpty_vertically_expand(Termpty *ty, int old_w, int old_h,
Termcell *c1, *c2;
c1 = &(OLD_SCREEN(0, y));
c2 = &(TERMPTY_SCREEN(ty, 0, y + from_history));
c2 = &(TERMPTY_SCREEN(ty, 0, y));
termpty_cell_copy(ty, c1, c2, old_w);
}
}
@ -747,7 +747,7 @@ _termpty_vertically_expand(Termpty *ty, int old_w, int old_h,
ts = ty->back[ty->backpos];
src = ts->cell;
dst = &(TERMPTY_SCREEN(ty, 0, y));
dst = &(TERMPTY_SCREEN(ty, 0, ty->h - from_history + y));
termpty_cell_copy(ty, src, dst, ts->w);
free(ts);
@ -755,6 +755,8 @@ _termpty_vertically_expand(Termpty *ty, int old_w, int old_h,
ty->backscroll_num--;
}
ty->circular_offset = (ty->circular_offset + ty->h - from_history) % ty->h;
ty->state.cy += from_history;
}