diff options
author | rsgowman <rgowman@google.com> | 2024-02-06 14:07:21 -0500 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-02-06 20:07:21 +0100 |
commit | 063916718505162b5ebe22268e413787cba32642 (patch) | |
tree | f2ae4d0f612fe0aa7a94bcf1ff11887edbbbc2bc /testcases/t/535-workspace-next-prev.t | |
parent | 60cc6ce1743d242fc51421df6ba6fef461e24ee2 (diff) | |
download | i3-063916718505162b5ebe22268e413787cba32642.tar.gz i3-063916718505162b5ebe22268e413787cba32642.zip |
Don't skip identically numbered workspaces when moving to next/prev (#4578)
eg if you have workspaces: { 1, 2:a, 2:b, 3 } and are on workspace 1,
then 'workspace next' should traverse 1 -> 2:a -> 2:b -> 3 -> 1 instead
of 1 -> 2:a -> 3 -> 1.
Fixes #4452
Diffstat (limited to 'testcases/t/535-workspace-next-prev.t')
-rw-r--r-- | testcases/t/535-workspace-next-prev.t | 32 |
1 files changed, 29 insertions, 3 deletions
diff --git a/testcases/t/535-workspace-next-prev.t b/testcases/t/535-workspace-next-prev.t index 0020586e..8510370c 100644 --- a/testcases/t/535-workspace-next-prev.t +++ b/testcases/t/535-workspace-next-prev.t @@ -56,9 +56,9 @@ sync_with_i3; # Setup workspaces so that they stay open (with an empty container). # open_window ensures, this # -# numbered named -# output 1 (left) : 1, 2, 3, 6, 7, B, F, C -# output 2 (right): 4, 5, A, D, E +# numbered numbered w/ names named +# output 1 (left) : 1, 2, 3, 6, 7, 8:a, 8:b, 8:c B, F, C +# output 2 (right): 4, 5, 8:d, 8:e, A, D, E # ################################################################################ @@ -68,6 +68,11 @@ cmd 'workspace D'; open_window; cmd 'workspace 4'; open_window; cmd 'workspace 5'; open_window; cmd 'workspace E'; open_window; +# numbered w/ name workspaces must be created in reverse order compared to +# other workspace types (because a new numbered w/ name workspace is prepended +# to the list of similarly numbered workspaces). +cmd 'workspace 8:e'; open_window; +cmd 'workspace 8:d'; open_window; cmd 'focus output left'; cmd 'workspace 1'; open_window; @@ -78,10 +83,19 @@ cmd 'workspace F'; open_window; cmd 'workspace 6'; open_window; cmd 'workspace C'; open_window; cmd 'workspace 7'; open_window; +# numbered w/ name workspaces must be created in reverse order compared to +# other workspace types (because a new numbered w/ name workspace is prepended +# to the list of similarly numbered workspaces). +cmd 'workspace 8:c'; open_window; +cmd 'workspace 8:b'; open_window; +cmd 'workspace 8:a'; open_window; ################################################################################ # Use workspace next and verify the correct order. # numbered -> numerical sort +# numbered w/ names -> numerical sort. Workspaces with the same number but +# different names sort by output, followed by reverse creation time on each +# output. # named -> sort by creation time ################################################################################ cmd 'workspace 1'; @@ -94,6 +108,12 @@ assert_next('5'); assert_next('6'); assert_next('7'); +assert_next('8:a'); +assert_next('8:b'); +assert_next('8:c'); +assert_next('8:d'); +assert_next('8:e'); + assert_next('B'); assert_next('F'); assert_next('C'); @@ -112,6 +132,12 @@ assert_prev('C'); assert_prev('F'); assert_prev('B'); +assert_prev('8:e'); +assert_prev('8:d'); +assert_prev('8:c'); +assert_prev('8:b'); +assert_prev('8:a'); + assert_prev('7'); assert_prev('6'); assert_prev('5'); |