diff options
author | Aram Drevekenin <aram@poor.dev> | 2022-04-09 00:00:02 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-04-09 00:00:02 +0200 |
commit | bd39891f78a414b9aeb0c96608ac21ead0c2a5dd (patch) | |
tree | c5ec3d0b892ae6bc90d8d09dfcff3d0a09997de0 /zellij-server | |
parent | ae2453ee681d52d4eeb10ddc51d7723701acd638 (diff) |
fix(compatibility): keep colors when scrolling (#1305)
Diffstat (limited to 'zellij-server')
-rw-r--r-- | zellij-server/src/panes/grid.rs | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/zellij-server/src/panes/grid.rs b/zellij-server/src/panes/grid.rs index e9058099f..3431131d7 100644 --- a/zellij-server/src/panes/grid.rs +++ b/zellij-server/src/panes/grid.rs @@ -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); |