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

allow dump_screen() to only dump the viewport #1794

Merged
merged 6 commits into from
Oct 19, 2022
Merged
Changes from 1 commit
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
7 changes: 1 addition & 6 deletions zellij-server/src/panes/grid.rs
Original file line number Diff line number Diff line change
Expand Up @@ -986,13 +986,8 @@ impl Grid {
}

pub fn dump_screen(&mut self) -> String {
let mut scrollback: String = dump_screen!(self.lines_above);
let viewport: String = dump_screen!(self.viewport);
if !scrollback.is_empty() {
scrollback.push('\n');
}
scrollback.push_str(&viewport);
scrollback
viewport
}
pub fn move_viewport_up(&mut self, count: usize) {
for _ in 0..count {
Expand Down