diff options
| author | Daniel Jankowski <daniel.jankowski@rub.de> | 2023-09-02 11:06:04 +0200 |
|---|---|---|
| committer | Daniel Jankowski <daniel.jankowski@rub.de> | 2023-09-02 11:06:04 +0200 |
| commit | d41e4892e7a03257167f26c0a96dde84f264e34c (patch) | |
| tree | d988962fd8cb4b950e4801694d5c9982b6d8361f /src/main.rs | |
| parent | chore: simplify sessions plugin (diff) | |
| download | sl0pstatus-d41e4892e7a03257167f26c0a96dde84f264e34c.tar.gz sl0pstatus-d41e4892e7a03257167f26c0a96dde84f264e34c.tar.xz sl0pstatus-d41e4892e7a03257167f26c0a96dde84f264e34c.zip | |
fix: hide frame for single panes with multiple tabs
Diffstat (limited to 'src/main.rs')
| -rw-r--r-- | src/main.rs | 19 |
1 files changed, 18 insertions, 1 deletions
diff --git a/src/main.rs b/src/main.rs index 9fc7681..5fe34f9 100644 --- a/src/main.rs +++ b/src/main.rs @@ -74,13 +74,30 @@ impl ZellijPlugin for State { } Event::PaneUpdate(pane_info) => { if self.module_config.hide_frame_for_single_pane { - frames::hide_frames_on_single_pane(self.state.tabs.clone(), pane_info); + frames::hide_frames_on_single_pane( + self.state.tabs.clone(), + pane_info, + get_plugin_ids(), + ); should_render = true; } } Event::SessionUpdate(session_info) => { + if self.module_config.hide_frame_for_single_pane { + let current_session = session_info.iter().find(|s| s.is_current_session); + + if let Some(current_session) = current_session { + frames::hide_frames_on_single_pane( + current_session.clone().tabs, + current_session.clone().panes, + get_plugin_ids(), + ); + } + } + self.state.sessions = session_info; + should_render = true; } Event::TabUpdate(tab_info) => { |
