Pull from buffer if row non-negative.
This commit is contained in:
parent
84d45097d0
commit
77b427a2f0
@ -1219,9 +1219,13 @@ void guac_terminal_scroll_display_down(guac_terminal* terminal) {
|
|||||||
/* Draw new rows from scrollback */
|
/* Draw new rows from scrollback */
|
||||||
for (row=start_row; row<=end_row; row++) {
|
for (row=start_row; row<=end_row; row++) {
|
||||||
|
|
||||||
|
/* If row in past, pull from scrollback */
|
||||||
|
if (row < 0) {
|
||||||
|
|
||||||
/* Get row from scrollback */
|
/* Get row from scrollback */
|
||||||
guac_terminal_scrollback_row* scrollback_row =
|
guac_terminal_scrollback_row* scrollback_row =
|
||||||
guac_terminal_scrollback_buffer_get_row(terminal->scrollback, row);
|
guac_terminal_scrollback_buffer_get_row(terminal->scrollback,
|
||||||
|
row);
|
||||||
|
|
||||||
/* Draw row */
|
/* Draw row */
|
||||||
/* FIXME: Clear row first */
|
/* FIXME: Clear row first */
|
||||||
@ -1230,6 +1234,20 @@ void guac_terminal_scroll_display_down(guac_terminal* terminal) {
|
|||||||
guac_terminal_delta_set(terminal->delta, dest_row, column,
|
guac_terminal_delta_set(terminal->delta, dest_row, column,
|
||||||
current++);
|
current++);
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Otherwise, pull from buffer */
|
||||||
|
else {
|
||||||
|
|
||||||
|
guac_terminal_char* current = &(terminal->buffer->characters[
|
||||||
|
terminal->buffer->width * row]);
|
||||||
|
|
||||||
|
for (column=0; column<terminal->buffer->width; column++)
|
||||||
|
guac_terminal_delta_set(terminal->delta, dest_row, column,
|
||||||
|
current++);
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
/* Next row */
|
/* Next row */
|
||||||
dest_row++;
|
dest_row++;
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user