Pull from buffer if row non-negative.
This commit is contained in:
parent
84d45097d0
commit
77b427a2f0
@ -1219,16 +1219,34 @@ 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++) {
|
||||||
|
|
||||||
/* Get row from scrollback */
|
/* If row in past, pull from scrollback */
|
||||||
guac_terminal_scrollback_row* scrollback_row =
|
if (row < 0) {
|
||||||
guac_terminal_scrollback_buffer_get_row(terminal->scrollback, row);
|
|
||||||
|
|
||||||
/* Draw row */
|
/* Get row from scrollback */
|
||||||
/* FIXME: Clear row first */
|
guac_terminal_scrollback_row* scrollback_row =
|
||||||
guac_terminal_char* current = scrollback_row->characters;
|
guac_terminal_scrollback_buffer_get_row(terminal->scrollback,
|
||||||
for (column=0; column<scrollback_row->length; column++)
|
row);
|
||||||
guac_terminal_delta_set(terminal->delta, dest_row, column,
|
|
||||||
current++);
|
/* Draw row */
|
||||||
|
/* FIXME: Clear row first */
|
||||||
|
guac_terminal_char* current = scrollback_row->characters;
|
||||||
|
for (column=0; column<scrollback_row->length; column++)
|
||||||
|
guac_terminal_delta_set(terminal->delta, dest_row, column,
|
||||||
|
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