fix(panes): remove unreachable expel-cycle branch
- commit
- 5ceb7d6a69de2e5fea672c7affbe8d1917cce59f
- author
- brice · · 2025-12-26 13:44 UTC
- parent
- b7c5bff
- signature
- unsigned
1 file · +3 -10
M internal/application/usecase/manage_panes.go +3 -10
| @@ -1381,16 +1381,9 @@ func cycleHorizontalToVerticalThenStack( | |||
| 1381 | 1381 | // This is used after expel: stack -> vertical; then Ctrl+[ / Ctrl+] should turn it into left/right. | |
| 1382 | 1382 | if direction == ConsumeOrExpelRight && strings.Contains(parent.ID, consumeOrExpelExpelCycleMarker) { | |
| 1383 | 1383 | parent.SplitDir = entity.SplitHorizontal | |
| 1384 | - | if direction == ConsumeOrExpelRight { | |
| 1385 | - | // Active should become the right child. | |
| 1386 | - | if parent.Children[1] != activeNode { | |
| 1387 | - | parent.Children[0], parent.Children[1] = parent.Children[1], parent.Children[0] | |
| 1388 | - | } | |
| 1389 | - | } else { | |
| 1390 | - | // Active should become the left child. | |
| 1391 | - | if parent.Children[0] != activeNode { | |
| 1392 | - | parent.Children[0], parent.Children[1] = parent.Children[1], parent.Children[0] | |
| 1393 | - | } | |
| 1384 | + | // Active should become the right child. | |
| 1385 | + | if parent.Children[1] != activeNode { | |
| 1386 | + | parent.Children[0], parent.Children[1] = parent.Children[1], parent.Children[0] | |
| 1394 | 1387 | } | |
| 1395 | 1388 | ws.ActivePaneID = activeNode.Pane.ID | |
| 1396 | 1389 | return true, "horizontal_split", nil | |
| @@ -1381,16 +1381,9 @@ func cycleHorizontalToVerticalThenStack( | |||||
| 1381 | // This is used after expel: stack -> vertical; then Ctrl+[ / Ctrl+] should turn it into left/right. | 1381 | // This is used after expel: stack -> vertical; then Ctrl+[ / Ctrl+] should turn it into left/right. | ||
| 1382 | if direction == ConsumeOrExpelRight && strings.Contains(parent.ID, consumeOrExpelExpelCycleMarker) { | 1382 | if direction == ConsumeOrExpelRight && strings.Contains(parent.ID, consumeOrExpelExpelCycleMarker) { | ||
| 1383 | parent.SplitDir = entity.SplitHorizontal | 1383 | parent.SplitDir = entity.SplitHorizontal | ||
| 1384 | - | if direction == ConsumeOrExpelRight { | 1384 | + | // Active should become the right child. |
| 1385 | - | // Active should become the right child. | 1385 | + | if parent.Children[1] != activeNode { |
| 1386 | - | if parent.Children[1] != activeNode { | 1386 | + | parent.Children[0], parent.Children[1] = parent.Children[1], parent.Children[0] |
| 1387 | - | parent.Children[0], parent.Children[1] = parent.Children[1], parent.Children[0] | |||
| 1388 | - | } | |||
| 1389 | - | } else { | |||
| 1390 | - | // Active should become the left child. | |||
| 1391 | - | if parent.Children[0] != activeNode { | |||
| 1392 | - | parent.Children[0], parent.Children[1] = parent.Children[1], parent.Children[0] | |||
| 1393 | - | } | |||
| 1394 | } | 1387 | } | ||
| 1395 | ws.ActivePaneID = activeNode.Pane.ID | 1388 | ws.ActivePaneID = activeNode.Pane.ID | ||
| 1396 | return true, "horizontal_split", nil | 1389 | return true, "horizontal_split", nil | ||