Skip to content

Commit

Permalink
fix(compatibility): keep colors when scrolling (#1305)
Browse files Browse the repository at this point in the history
  • Loading branch information
imsnif authored Apr 8, 2022
1 parent ae2453e commit bd39891
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions zellij-server/src/panes/grid.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1864,12 +1864,14 @@ impl Perform for Grid {
} else if c == 'M' {
// delete lines if currently inside scroll region
let line_count_to_delete = next_param_or(1);
let pad_character = EMPTY_TERMINAL_CHARACTER;
let mut pad_character = EMPTY_TERMINAL_CHARACTER;
pad_character.styles = self.cursor.pending_styles;
self.delete_lines_in_scroll_region(line_count_to_delete, pad_character);
} else if c == 'L' {
// insert blank lines if inside scroll region
let line_count_to_add = next_param_or(1);
let pad_character = EMPTY_TERMINAL_CHARACTER;
let mut pad_character = EMPTY_TERMINAL_CHARACTER;
pad_character.styles = self.cursor.pending_styles;
self.add_empty_lines_in_scroll_region(line_count_to_add, pad_character);
} else if c == 'G' || c == '`' {
let column = next_param_or(1).saturating_sub(1);
Expand Down

0 comments on commit bd39891

Please sign in to comment.