Skip to content

Commit

Permalink
Merge patch branch changes to main.
Browse files Browse the repository at this point in the history
  • Loading branch information
necouchman committed Jul 22, 2024
2 parents 2aabe28 + 8651022 commit a5a9100
Show file tree
Hide file tree
Showing 3 changed files with 35 additions and 1 deletion.
2 changes: 1 addition & 1 deletion src/terminal/select.c
Original file line number Diff line number Diff line change
Expand Up @@ -298,7 +298,7 @@ static void guac_terminal_clipboard_append_row(guac_terminal* terminal,
end = buffer_row->length - 1;

/* Get position of last not null char */
for (eol = buffer_row->length; eol > start; eol--) {
for (eol = buffer_row->length - 1; eol > start; eol--) {

if (buffer_row->characters[eol].value != 0)
break;
Expand Down
26 changes: 26 additions & 0 deletions src/terminal/terminal-handlers.c
Original file line number Diff line number Diff line change
Expand Up @@ -840,6 +840,32 @@ int guac_terminal_csi(guac_terminal* term, unsigned char c) {

break;

/* S: Scroll Up by amount */
case 'S':

/* Get move amount */
amount = argv[0];
if (amount == 0) amount = 1;

/* Scroll up */
guac_terminal_scroll_up(term, term->scroll_start,
term->scroll_end, amount);

break;

/* T: Scroll Down by amount */
case 'T':

/* Get move amount */
amount = argv[0];
if (amount == 0) amount = 1;

/* Scroll Down */
guac_terminal_scroll_down(term, term->scroll_start,
term->scroll_end, amount);

break;

/* X: Erase characters (no scroll) */
case 'X':

Expand Down
8 changes: 8 additions & 0 deletions src/terminal/terminal.c
Original file line number Diff line number Diff line change
Expand Up @@ -1014,6 +1014,10 @@ int guac_terminal_scroll_up(guac_terminal* term,
end_row - amount + 1, 0,
end_row, term->term_width - 1);

/* Flush display copy before the cursor commit override operation
* type for visible cursor row and breaks display. */
guac_terminal_display_flush(term->display);

return 0;
}

Expand All @@ -1027,6 +1031,10 @@ int guac_terminal_scroll_down(guac_terminal* term,
start_row, 0,
start_row + amount - 1, term->term_width - 1);

/* Flush display copy before the cursor commit override operation
* type for visible cursor row and breaks display. */
guac_terminal_display_flush(term->display);

return 0;
}

Expand Down

0 comments on commit a5a9100

Please sign in to comment.