Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(grid): fix DL/IL being ineffective without scrolling region #3382

Merged
merged 1 commit into from
May 27, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 10 additions & 2 deletions zellij-server/src/panes/grid.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2740,13 +2740,21 @@ impl Perform for Grid {
self.clear_scroll_region();
}
} else if c == 'M' {
// delete lines if currently inside scroll region
// delete lines if currently inside scroll region, or otherwise
// delete lines in the entire viewport
if self.scroll_region.is_none() {
self.set_scroll_region_to_viewport_size();
}
let line_count_to_delete = next_param_or(1);
let mut pad_character = EMPTY_TERMINAL_CHARACTER;
pad_character.styles = self.cursor.pending_styles.clone();
self.delete_lines_in_scroll_region(line_count_to_delete, pad_character);
} else if c == 'L' {
// insert blank lines if inside scroll region
// insert blank lines if inside scroll region, or otherwise insert
// blank lines in the entire viewport
if self.scroll_region.is_none() {
self.set_scroll_region_to_viewport_size();
}
let line_count_to_add = next_param_or(1);
let mut pad_character = EMPTY_TERMINAL_CHARACTER;
pad_character.styles = self.cursor.pending_styles.clone();
Expand Down
Loading