diff options
| author | Aram Drevekenin <aram@poor.dev> | 2025-07-09 17:32:41 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2025-07-09 17:32:41 +0200 |
| commit | 8113ddf9dbbf04bf8bb5e33c8de0e7d55155d277 (patch) | |
| tree | faa9a979f08a832faa46ccb7b28e0558d32f74a9 | |
| parent | fix(web-client): use default_layout if configured (#4278) (diff) | |
| download | sl0ppij-8113ddf9dbbf04bf8bb5e33c8de0e7d55155d277.tar.gz sl0ppij-8113ddf9dbbf04bf8bb5e33c8de0e7d55155d277.tar.xz sl0ppij-8113ddf9dbbf04bf8bb5e33c8de0e7d55155d277.zip | |
fix(compact-bar): fix cursor length calculation for multiple users (#4279)
* fix(compact-bar): account for multiplayer cursor length
* fix(e2e): account for races in tmux mode
* style(fmt): rustfmt
* docs(changelog): add PR
| -rw-r--r-- | CHANGELOG.md | 2 | ||||
| -rw-r--r-- | default-plugins/compact-bar/src/tab.rs | 1 | ||||
| -rw-r--r-- | src/tests/e2e/cases.rs | 4 |
3 files changed, 6 insertions, 1 deletions
diff --git a/CHANGELOG.md b/CHANGELOG.md index cdaa7ec5..aca049f6 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,7 +6,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/) ## [Unreleased] * feat: multiple select and bulk pane actions (https://github.com/zellij-org/zellij/pull/4169 and https://github.com/zellij-org/zellij/pull/4171 and https://github.com/zellij-org/zellij/pull/4221) -* feat: add an optional key tooltip to show the current keybindings for the compact bar (https://github.com/zellij-org/zellij/pull/4225) +* feat: add an optional key tooltip to show the current keybindings for the compact bar (https://github.com/zellij-org/zellij/pull/4225 and https://github.com/zellij-org/zellij/pull/4279) * feat: web-client, allowing users to share sessions in the browser (https://github.com/zellij-org/zellij/pull/4242, https://github.com/zellij-org/zellij/pull/4257 and https://github.com/zellij-org/zellij/pull/4278) * performance: consolidate renders (https://github.com/zellij-org/zellij/pull/4245) * feat: add plugin API to replace a pane with another existing pane (https://github.com/zellij-org/zellij/pull/4246) diff --git a/default-plugins/compact-bar/src/tab.rs b/default-plugins/compact-bar/src/tab.rs index 68609b23..06517c1c 100644 --- a/default-plugins/compact-bar/src/tab.rs +++ b/default-plugins/compact-bar/src/tab.rs @@ -14,6 +14,7 @@ fn cursors(focused_clients: &[ClientId], colors: MultiplayerColors) -> (Vec<ANSI len += 1; } } + len += 2; // 2 for the brackets: [ and ] (cursors, len) } diff --git a/src/tests/e2e/cases.rs b/src/tests/e2e/cases.rs index e928376c..c122f9f8 100644 --- a/src/tests/e2e/cases.rs +++ b/src/tests/e2e/cases.rs @@ -101,8 +101,12 @@ fn account_for_races_in_snapshot(snapshot: String) -> String { // once that happens, we should be able to remove this hack (and adjust the snapshots for the // trailing spaces that we had to get rid of here) let base_replace = Regex::new(r"Alt <\[\]> BASE \s*\n").unwrap(); + let base_replace_tmux_mode = Regex::new(r"Alt \[\|SPACE\|Alt \] BASE \s*\n").unwrap(); let eol_arrow_replace = Regex::new(r"\s*\n").unwrap(); let snapshot = base_replace.replace_all(&snapshot, "\n").to_string(); + let snapshot = base_replace_tmux_mode + .replace_all(&snapshot, "\n") + .to_string(); let snapshot = eol_arrow_replace.replace_all(&snapshot, "\n").to_string(); snapshot |
