aboutsummaryrefslogtreecommitdiffstats
path: root/default-plugins/status-bar/src
diff options
context:
space:
mode:
authorAram Drevekenin <aram@poor.dev>2021-08-12 14:50:00 +0200
committerGitHub <noreply@github.com>2021-08-12 14:50:00 +0200
commita37d3e5889476bbac209d20f89886daa3e9d3992 (patch)
treec02fbf779dda57b615a852fd6a43818b20722b19 /default-plugins/status-bar/src
parentdocs(governance): arbiter no-confidence vote (diff)
downloadsl0ppij-a37d3e5889476bbac209d20f89886daa3e9d3992.tar.gz
sl0ppij-a37d3e5889476bbac209d20f89886daa3e9d3992.tar.xz
sl0ppij-a37d3e5889476bbac209d20f89886daa3e9d3992.zip
feat(ui): pane frames (new pane UI) (#643)
* work * resize working * move focus working * close pane working * selection and fullscreen working * pane title line * titles and conditional scroll title * whole tab resize working * plugin frames working * plugin splitting working * truncate pane frame titles * cleanup * panes always draw their own borders - also fix gap * toggle pane frames * move toggle to screen and fix some bugs * fix plugin frame toggle * fix terminal window resize * fix scrolling and fullscreen bugs * unit tests passing * e2e tests passing and new test for new frames added * refactor: TerminalPane and PluginPane * refactor: Tab * refactor: moar Tab * refactor: Boundaries * only render and calculate boundaries when there are no pane frames * refactor: Layout * fix(grid): properly resize when coming back from alternative viewport * style: remove commented code * style: fmt * style: fmt * style: fmt + clippy * docs(changelog): update change
Diffstat (limited to 'default-plugins/status-bar/src')
-rw-r--r--default-plugins/status-bar/src/main.rs6
1 files changed, 5 insertions, 1 deletions
diff --git a/default-plugins/status-bar/src/main.rs b/default-plugins/status-bar/src/main.rs
index 83eb50c9..dba373f6 100644
--- a/default-plugins/status-bar/src/main.rs
+++ b/default-plugins/status-bar/src/main.rs
@@ -154,7 +154,11 @@ impl ZellijPlugin for State {
let colored_elements = color_elements(self.mode_info.palette);
let superkey = superkey(colored_elements, separator);
- let ctrl_keys = ctrl_keys(&self.mode_info, cols - superkey.len, separator);
+ let ctrl_keys = ctrl_keys(
+ &self.mode_info,
+ cols.saturating_sub(superkey.len),
+ separator,
+ );
let first_line = format!("{}{}", superkey, ctrl_keys);
let second_line = keybinds(&self.mode_info, cols);