[Regression] move-focus stops working if you create a pane with a non-default --size #15735

Closed
opened 2026-01-31 04:46:59 +00:00 by claunia · 4 comments
Owner

Originally created by @FabioTurati on GitHub (Oct 30, 2021).

Windows Terminal version (or Windows build number)

1.11.2921.0

Other Software

No response

Steps to reproduce

Start WT with command line arguments that split the window in 4 panes, like this:

wt.exe ; split-pane -H --size 0.30 ; split-pane -V ; move-focus left ; move-focus up ; split-pane -V

There should be 2 panes at the top and 2 at the bottom; instead, there's only one at the top and 3 at the bottom. move-focus left still works (it's the one in the bottom left corner that has been split; if you remove that command, it will be the one in the bottom right corner), but move-focus up seems to fail.

The culprit is the --size 0.30 argument; remove it (or change it to --size 0.50) and you'll get the 2 panes at the top and 2 at the bottom (all of the same size).

This is a regression: with the previous version (1.10) it was working as expected.

Expected Behavior

The panes should look like this:

---------------------
|         |         |
|         |         |
|         |         |
|         |         |
|---------+---------|
|         |         |
|         |         |
---------------------

Actual Behavior

The panes look like this:

---------------------
|                   |
|                   |
|                   |
|                   |
|---------+---------|
|    |    |         |
|    |    |         |
---------------------
Originally created by @FabioTurati on GitHub (Oct 30, 2021). ### Windows Terminal version (or Windows build number) 1.11.2921.0 ### Other Software _No response_ ### Steps to reproduce Start WT with command line arguments that split the window in 4 panes, like this: wt.exe ; split-pane -H --size 0.30 ; split-pane -V ; move-focus left ; move-focus up ; split-pane -V There should be 2 panes at the top and 2 at the bottom; instead, there's only one at the top and 3 at the bottom. `move-focus left` still works (it's the one in the bottom left corner that has been split; if you remove that command, it will be the one in the bottom right corner), but `move-focus up` seems to fail. The culprit is the `--size 0.30` argument; remove it (or change it to `--size 0.50`) and you'll get the 2 panes at the top and 2 at the bottom (all of the same size). This is a regression: with the previous version (1.10) it was working as expected. ### Expected Behavior The panes should look like this: ``` --------------------- | | | | | | | | | | | | |---------+---------| | | | | | | --------------------- ``` ### Actual Behavior The panes look like this: ``` --------------------- | | | | | | | | |---------+---------| | | | | | | | | --------------------- ```
claunia added the Needs-TriageNeeds-Tag-Fix labels 2026-01-31 04:46:59 +00:00
Author
Owner

@elsaco commented on GitHub (Oct 30, 2021):

@FabioTurati the issue is step nr. 5, move-focus up not moving focus at the top pane. You can see it by running:

wt.exe ; split-pane -H -s 0.3 ; split-pane -V ; move-focus left ; move-focus up

However, if you use digits for pane directions it works as expected. Try this command please:

wt.exe ; split-pane -H -s 0.3 ; split-pane -V ; move-focus 5 ; move-focus 8 ; split-pane -V

8 - first pane
5 - previous pane

Run wt.exe move-focus --help to see all positionals.

@elsaco commented on GitHub (Oct 30, 2021): @FabioTurati the issue is step nr. 5, `move-focus up` not moving focus at the top pane. You can see it by running: `wt.exe ; split-pane -H -s 0.3 ; split-pane -V ; move-focus left ; move-focus up` However, if you use digits for pane directions it works as expected. Try this command please: `wt.exe ; split-pane -H -s 0.3 ; split-pane -V ; move-focus 5 ; move-focus 8 ; split-pane -V` 8 - first pane 5 - previous pane Run `wt.exe move-focus --help` to see all positionals.
Author
Owner

@elsaco commented on GitHub (Oct 30, 2021):

With WT Preview ver. 1.12.2931.0 (latest from the Store) the issue is not reproduced. Running

wt.exe ; split-pane -H --size 0.30 ; split-pane -V ; move-focus left ; move-focus up ; split-pane -V

will setup intended layout:
split-pane_11654

@elsaco commented on GitHub (Oct 30, 2021): With WT Preview ver. 1.12.2931.0 (latest from the Store) the issue is not reproduced. Running `wt.exe ; split-pane -H --size 0.30 ; split-pane -V ; move-focus left ; move-focus up ; split-pane -V ` will setup intended layout: ![split-pane_11654](https://user-images.githubusercontent.com/3933920/139540418-cd69ed90-837d-4096-ba72-6cf5f10b9bb6.png)
Author
Owner

@Rosefield commented on GitHub (Oct 30, 2021):

I believe this is fixed on the preview branch now, specifically it was added here https://github.com/microsoft/terminal/pull/11153#discussion_r702928256.

As Elsaco said, you can also use move-focus first to go to the original pane you created instead of using directional movement to get there as a workaround.

@Rosefield commented on GitHub (Oct 30, 2021): I believe this is fixed on the preview branch now, specifically it was added here https://github.com/microsoft/terminal/pull/11153#discussion_r702928256. As Elsaco said, you can also use `move-focus first` to go to the original pane you created instead of using directional movement to get there as a workaround.
Author
Owner

@FabioTurati commented on GitHub (Oct 30, 2021):

Thanks, @elsaco, I can confirm that using move-focus 8 (or its readable version, move-focus first) solves the issue.

That said, I can confirm what both you and @Rosefield said: in the preview version (currently 1.12.2931.0) the bug is already fixed.

In case anyone is wondering (it took me a while to figure it out): to launch the preview version from the command line you must go to %USERPROFILE%\AppData\Local\Microsoft\WindowsApps, find the directory of the preview version (in my case Microsoft.WindowsTerminalPreview_8wekyb3d8bbwe), go there, and launch the wt.exe that you find there.

And while we are here: thanks, Rosefield, for all the great work you've done!

@FabioTurati commented on GitHub (Oct 30, 2021): Thanks, @elsaco, I can confirm that using `move-focus 8` (or its readable version, `move-focus first`) solves the issue. That said, I can confirm what both you and @Rosefield said: in the preview version (currently 1.12.2931.0) the bug is already fixed. In case anyone is wondering (it took me a while to figure it out): to launch the preview version from the command line you must go to `%USERPROFILE%\AppData\Local\Microsoft\WindowsApps`, find the directory of the preview version (in my case `Microsoft.WindowsTerminalPreview_8wekyb3d8bbwe`), go there, and launch the `wt.exe` that you find there. And while we are here: thanks, Rosefield, for all the great work you've done!
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/terminal#15735