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-server/src/ui | |
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-server/src/ui')
-rw-r--r-- | zellij-server/src/ui/pane_boundaries_frame.rs | 3 | ||||
-rw-r--r-- | zellij-server/src/ui/pane_contents_and_ui.rs | 4 |
2 files changed, 6 insertions, 1 deletions
diff --git a/zellij-server/src/ui/pane_boundaries_frame.rs b/zellij-server/src/ui/pane_boundaries_frame.rs index 6209466c4..537a80c47 100644 --- a/zellij-server/src/ui/pane_boundaries_frame.rs +++ b/zellij-server/src/ui/pane_boundaries_frame.rs @@ -122,6 +122,9 @@ impl PaneFrame { pub fn indicate_first_run(&mut self) { self.is_first_run = true; } + pub fn override_color(&mut self, color: PaletteColor) { + self.color = Some(color); + } fn client_cursor(&self, client_id: ClientId) -> Vec<TerminalCharacter> { let color = client_id_to_colors(client_id, self.style.colors); background_color(" ", color.map(|c| c.0)) diff --git a/zellij-server/src/ui/pane_contents_and_ui.rs b/zellij-server/src/ui/pane_contents_and_ui.rs index 1cc715d83..7f718d0b0 100644 --- a/zellij-server/src/ui/pane_contents_and_ui.rs +++ b/zellij-server/src/ui/pane_contents_and_ui.rs @@ -238,7 +238,9 @@ impl<'a> PaneContentsAndUi<'a> { session_is_mirrored: bool, ) -> Option<PaletteColor> { let pane_focused_for_client_id = self.focused_clients.contains(&client_id); - if pane_focused_for_client_id { + if let Some(override_color) = self.pane.frame_color_override() { + Some(override_color) + } else if pane_focused_for_client_id { match mode { InputMode::Normal | InputMode::Locked => { if session_is_mirrored || !self.multiple_users_exist_in_session { |