diff options
author | Aram Drevekenin <aram@poor.dev> | 2022-12-14 22:26:48 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-12-14 22:26:48 +0100 |
commit | c3115a428ed5c990cc5ead5629dabb624ae90453 (patch) | |
tree | fe1a3c0f344b6d1056789861d6d28ca5196f838d /zellij-utils | |
parent | 177cd20beaf7a89d54b295f1aab498b7ab2c04c1 (diff) |
fix(panes): show visual error when unable to split panes vertically/horizontally (#2025)
* fix(panes): show visual error when failing to split pane vertically/horizontally
* fix: lockfile
Diffstat (limited to 'zellij-utils')
-rw-r--r-- | zellij-utils/src/errors.rs | 10 | ||||
-rw-r--r-- | zellij-utils/src/pane_size.rs | 2 |
2 files changed, 11 insertions, 1 deletions
diff --git a/zellij-utils/src/errors.rs b/zellij-utils/src/errors.rs index cbd0bdf1d..4b7149ecc 100644 --- a/zellij-utils/src/errors.rs +++ b/zellij-utils/src/errors.rs @@ -215,6 +215,7 @@ pub enum ContextType { StdinHandler, AsyncTask, PtyWrite(PtyWriteContext), + BackgroundJob(BackgroundJobContext), /// An empty, placeholder call. This should be thought of as representing no call at all. /// A call stack representation filled with these is the representation of an empty call stack. Empty, @@ -231,6 +232,7 @@ impl Display for ContextType { ContextType::StdinHandler => Some(("stdin_handler_thread:", "AcceptInput".to_string())), ContextType::AsyncTask => Some(("stream_terminal_bytes:", "AsyncTask".to_string())), ContextType::PtyWrite(c) => Some(("pty_writer_thread:", format!("{:?}", c))), + ContextType::BackgroundJob(c) => Some(("background_jobs_thread:", format!("{:?}", c))), ContextType::Empty => None, } { write!(f, "{} {}", left.purple(), right.green()) @@ -350,6 +352,8 @@ pub enum ScreenContext { SearchToggleCaseSensitivity, SearchToggleWholeWord, SearchToggleWrap, + AddRedPaneFrameColorOverride, + ClearPaneFrameColorOverride, } /// Stack call representations corresponding to the different types of [`PtyInstruction`]s. @@ -420,6 +424,12 @@ pub enum PtyWriteContext { Exit, } +#[derive(Debug, Clone, Copy, PartialEq, Serialize, Deserialize)] +pub enum BackgroundJobContext { + DisplayPaneError, + Exit, +} + use thiserror::Error; #[derive(Debug, Error)] pub enum ZellijError { diff --git a/zellij-utils/src/pane_size.rs b/zellij-utils/src/pane_size.rs index 9c64080d1..048ae3d65 100644 --- a/zellij-utils/src/pane_size.rs +++ b/zellij-utils/src/pane_size.rs @@ -56,7 +56,7 @@ impl Dimension { pub fn fixed(size: usize) -> Dimension { Self { constraint: Constraint::Fixed(size), - inner: 1, + inner: size, } } |