aboutsummaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorCraig Jennings <c@cjennings.net>2026-06-20 10:51:51 -0400
committerCraig Jennings <c@cjennings.net>2026-06-20 10:51:51 -0400
commit9e069a310d14f9b6ebbe6e3747240e7844d9ffcb (patch)
tree7b7e0d0ef064342d52442f0ac88b1fc8ed45ab96 /tests
parent1020474986be7602aee5673d278586be2b750839 (diff)
downloaddotemacs-9e069a310d14f9b6ebbe6e3747240e7844d9ffcb.tar.gz
dotemacs-9e069a310d14f9b6ebbe6e3747240e7844d9ffcb.zip
fix(windows): keep the pulled-away window on the arrow's edge
The sole-window pull split toward the arrow at 50/50, so a fullscreen terminal jumped above the revealed buffer at half height. Now the reveal opens on the opposite side and is minimized to a sliver, so the current window keeps the arrow's edge near-full and the sticky windsize arrows shrink it step by step, matching the feel of resizing an existing split.
Diffstat (limited to 'tests')
-rw-r--r--tests/test-ui-navigation--window-resize.el34
1 files changed, 18 insertions, 16 deletions
diff --git a/tests/test-ui-navigation--window-resize.el b/tests/test-ui-navigation--window-resize.el
index 986ce1580..553219755 100644
--- a/tests/test-ui-navigation--window-resize.el
+++ b/tests/test-ui-navigation--window-resize.el
@@ -44,24 +44,26 @@ otherwise route to the pull-away path."
(should ran) ; dispatched to the right command
(should overriding-terminal-local-map)))) ; loop armed
-(ert-deftest test-ui-navigation-window-arrow-direction ()
- "Normal/Error: each arrow maps to its split direction; anything else is nil."
- (should (eq (cj/window-arrow-direction "<left>") 'left))
- (should (eq (cj/window-arrow-direction "<right>") 'right))
- (should (eq (cj/window-arrow-direction "<up>") 'above))
- (should (eq (cj/window-arrow-direction "<down>") 'below))
- (should (null (cj/window-arrow-direction "<prior>")))
- (should (null (cj/window-arrow-direction "x"))))
+(ert-deftest test-ui-navigation-window-pull-side ()
+ "Normal/Error: each arrow maps to the *opposite* side (where the revealed
+window opens, so the current window keeps the arrow's edge); anything else
+is nil."
+ (should (eq (cj/window-pull-side "<down>") 'above))
+ (should (eq (cj/window-pull-side "<up>") 'below))
+ (should (eq (cj/window-pull-side "<left>") 'right))
+ (should (eq (cj/window-pull-side "<right>") 'left))
+ (should (null (cj/window-pull-side "<prior>")))
+ (should (null (cj/window-pull-side "x"))))
(ert-deftest test-ui-navigation-window-resize-sticky-sole-window-pulls-away ()
- "Normal: with a single window, the arrow pulls a window away toward its
-direction (via `cj/window--pull-away') rather than resizing, then arms the
-loop. `cj/window--pull-away' is stubbed to capture the direction so no real
-window split happens under `--batch'."
- (dolist (case '((left . left)
- (right . right)
- (up . above)
- (down . below)))
+ "Normal: with a single window, the arrow pulls a sliver away on the side
+opposite the arrow (via `cj/window--pull-away') rather than resizing, then
+arms the loop. `cj/window--pull-away' is stubbed to capture the side so no
+real window split happens under `--batch'."
+ (dolist (case '((down . above)
+ (up . below)
+ (left . right)
+ (right . left)))
(let ((pulled nil)
(overriding-terminal-local-map nil)
(pre-command-hook nil))