aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAram Drevekenin <aram@poor.dev>2025-03-03 13:45:38 +0100
committerGitHub <noreply@github.com>2025-03-03 13:45:38 +0100
commitf096dc7b88db19f139595afd3a9608daa76edaf5 (patch)
treed6f80a02d83039e51b4ee16528c0e5502cc3e7f7
parentfix(toolchain): Unbreak client startup (diff)
downloadsl0ppij-f096dc7b88db19f139595afd3a9608daa76edaf5.tar.gz
sl0ppij-f096dc7b88db19f139595afd3a9608daa76edaf5.tar.xz
sl0ppij-f096dc7b88db19f139595afd3a9608daa76edaf5.zip
fix(panes): when focusing pane off the tab edge, break ties with active_at instead of y (#4037)
* fix(panes): when focusing pane off the tab edge, break ties with active_at instead of y * docs(changelog): update pr
-rw-r--r--CHANGELOG.md1
-rw-r--r--zellij-server/src/panes/tiled_panes/tiled_pane_grid.rs8
2 files changed, 5 insertions, 4 deletions
diff --git a/CHANGELOG.md b/CHANGELOG.md
index 2d148911..4a3e4f7b 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -38,6 +38,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/)
* chore(repo): update some dependencies (https://github.com/zellij-org/zellij/pull/4019)
* fix(grid): reap sixel images on clear (https://github.com/zellij-org/zellij/pull/3982)
* fix(panes): properly render stacked panes when pane frames are disabled (https://github.com/zellij-org/zellij/pull/4035)
+* fix(panes): break ties by last focus time when focusing panes on screen edge (https://github.com/zellij-org/zellij/pull/4037)
## [0.41.2] - 2024-11-19
* fix(input): keypresses not being identified properly with kitty keyboard protocol in some terminals (https://github.com/zellij-org/zellij/pull/3725)
diff --git a/zellij-server/src/panes/tiled_panes/tiled_pane_grid.rs b/zellij-server/src/panes/tiled_panes/tiled_pane_grid.rs
index 5f2bf834..5bca05cb 100644
--- a/zellij-server/src/panes/tiled_panes/tiled_pane_grid.rs
+++ b/zellij-server/src/panes/tiled_panes/tiled_pane_grid.rs
@@ -1044,28 +1044,28 @@ impl<'a> TiledPaneGrid<'a> {
Direction::Left => {
let x_comparison = a.x().cmp(&b.x());
match x_comparison {
- Ordering::Equal => b.y().cmp(&a.y()),
+ Ordering::Equal => a.active_at().cmp(&b.active_at()),
_ => x_comparison,
}
},
Direction::Right => {
let x_comparison = b.x().cmp(&a.x());
match x_comparison {
- Ordering::Equal => b.y().cmp(&a.y()),
+ Ordering::Equal => a.active_at().cmp(&b.active_at()),
_ => x_comparison,
}
},
Direction::Up => {
let y_comparison = a.y().cmp(&b.y());
match y_comparison {
- Ordering::Equal => a.x().cmp(&b.x()),
+ Ordering::Equal => a.active_at().cmp(&b.active_at()),
_ => y_comparison,
}
},
Direction::Down => {
let y_comparison = b.y().cmp(&a.y());
match y_comparison {
- Ordering::Equal => b.x().cmp(&a.x()),
+ Ordering::Equal => a.active_at().cmp(&b.active_at()),
_ => y_comparison,
}
},