aboutsummaryrefslogtreecommitdiffstats
path: root/zellij-utils/src/input
diff options
context:
space:
mode:
authorOleks Gnatovskyi <22867443+alekspickle@users.noreply.github.com>2023-03-29 23:04:57 +0200
committerGitHub <noreply@github.com>2023-03-29 23:04:57 +0200
commitbdb39b19a6117dc344b1dfee27df778f5386bb62 (patch)
treee3adf519f4c1641bfbdbaa61929a5c8e776a3043 /zellij-utils/src/input
parentdocs(readme): fix roadmap link (diff)
downloadsl0ppij-bdb39b19a6117dc344b1dfee27df778f5386bb62.tar.gz
sl0ppij-bdb39b19a6117dc344b1dfee27df778f5386bb62.tar.xz
sl0ppij-bdb39b19a6117dc344b1dfee27df778f5386bb62.zip
feat(terminal): cli and bindable action to clear all buffers for a specific pane (#2239)
* fix typo * Add clear screen action * add proper test * added bindable action; remove pointless default impl * add default binding * use imsnif's variant * remove commented example config * remove log line --------- Co-authored-by: Aram Drevekenin <aram@poor.dev>
Diffstat (limited to 'zellij-utils/src/input')
-rw-r--r--zellij-utils/src/input/actions.rs3
1 files changed, 3 insertions, 0 deletions
diff --git a/zellij-utils/src/input/actions.rs b/zellij-utils/src/input/actions.rs
index 8e614d6d..d7589791 100644
--- a/zellij-utils/src/input/actions.rs
+++ b/zellij-utils/src/input/actions.rs
@@ -120,6 +120,8 @@ pub enum Action {
MoveFocusOrTab(Direction),
MovePane(Option<Direction>),
MovePaneBackwards,
+ /// Clear all buffers of a current screen
+ ClearScreen,
/// Dumps the screen to a file
DumpScreen(String, bool),
/// Scroll up in focus pane.
@@ -255,6 +257,7 @@ impl Action {
CliAction::MoveFocusOrTab { direction } => Ok(vec![Action::MoveFocusOrTab(direction)]),
CliAction::MovePane { direction } => Ok(vec![Action::MovePane(direction)]),
CliAction::MovePaneBackwards => Ok(vec![Action::MovePaneBackwards]),
+ CliAction::Clear => Ok(vec![Action::ClearScreen]),
CliAction::DumpScreen { path, full } => Ok(vec![Action::DumpScreen(
path.as_os_str().to_string_lossy().into(),
full,