summaryrefslogtreecommitdiffstats
path: root/zellij-server/src/panes/terminal_pane.rs
diff options
context:
space:
mode:
authorCosmin Popescu <cosminadrianpopescu@gmail.com>2022-05-20 11:22:40 +0200
committerGitHub <noreply@github.com>2022-05-20 11:22:40 +0200
commit76d871294d0b156afaad50360e6ba4176dc918e4 (patch)
treeda996fb11e785bf0a8365b1918c2f67a1e7ef7a2 /zellij-server/src/panes/terminal_pane.rs
parente663ef2db760bdc05694b1053702bdc22c4f9d08 (diff)
feat(actions): dump the terminal screen into a file (#1375)
* Initial commit for fixing #1353 * adding a new line between the lines_above and the viewport * changes following code review * implementing a test case for the dump screen * implemented test case for dump_screen * better regexp replace * fixes following code review * style(api): remove extraneous method in plugin pane * style(fmt): rustfmt * style(tests): fix method name Co-authored-by: Aram Drevekenin <aram@poor.dev>
Diffstat (limited to 'zellij-server/src/panes/terminal_pane.rs')
-rw-r--r--zellij-server/src/panes/terminal_pane.rs3
1 files changed, 3 insertions, 0 deletions
diff --git a/zellij-server/src/panes/terminal_pane.rs b/zellij-server/src/panes/terminal_pane.rs
index 2b68ea338..7ada5f024 100644
--- a/zellij-server/src/panes/terminal_pane.rs
+++ b/zellij-server/src/panes/terminal_pane.rs
@@ -386,6 +386,9 @@ impl Pane for TerminalPane {
self.geom.y -= count;
self.reflow_lines();
}
+ fn dump_screen(&mut self, _client_id: ClientId) -> String {
+ return self.grid.dump_screen();
+ }
fn scroll_up(&mut self, count: usize, _client_id: ClientId) {
self.grid.move_viewport_up(count);
self.set_should_render(true);