wezterm icon indicating copy to clipboard operation
wezterm copied to clipboard

Activate pane direction, remembering last active pane when the direction is ambiguous

Open DanCardin opened this issue 1 year ago • 4 comments

What Operating System(s) are you seeing this problem on?

macOS

Which Wayland compositor or X11 Window manager(s) are you using?

No response

WezTerm version

20220807-193129-ac3a9c00

Did you try the latest nightly build to see if the issue is better (or worse!) than your current version?

Yes, and I updated the version box above to show the version of the nightly that I tried

Describe the bug

When activating a pane in a direction, it always seems to choose the one bottom/right-most one, depending on how the panes are split.

To Reproduce

In the below video, I'm navigating left and right (starting top right, left, right (now i'm in the bottom right, instead of back in the top right

https://user-images.githubusercontent.com/701548/183469547-ee2eaa69-dc47-40b3-9cac-90808b45f6c9.mp4

Configuration

no config

Expected Behavior

Ideally it would remember the last active pane and choose that, when a direction light "right" is ambiguous and could be one of some number of panes.

Logs

No response

Anything else?

Sorry this is more of a feature request, not a bug, but i can't seem to be able to change the labels after the fact.

DanCardin avatar Aug 08 '22 16:08 DanCardin

while I ponder this, here's another suggestion for you: I know this is a different way of thinking about it, but you may wish to try https://wezfurlong.org/wezterm/config/lua/keyassignment/PaneSelect.html

wez avatar Aug 08 '22 20:08 wez

Yea I was aware of this, I use it for pane position swapping. But for movement, i have mapped to the same split/motion mappings I use in vim (and it's all directional, that way); so I'd rather not, if possible.

I tend to do these navigations without thinking, positionally because i know where i am and I know on which pane I just was, as a swap among them.

DanCardin avatar Aug 08 '22 21:08 DanCardin

This should be fixed now in main.

It typically takes about an hour before fixes are available as nightly builds for all platforms. Linux builds are the fastest to build and are often available within about 20 minutes. Windows and macOS builds take a bit longer.

Please take a few moments to try out the fix and let me know how that works out. You can find the nightly downloads for your system in the wezterm installation docs.

If you prefer to use packages provided by your distribution or package manager of choice and don't want to replace that with a nightly download, keep in mind that you can download portable packages (eg: a .dmg file on macOS, a .zip file on Windows and an .AppImage file on Linux) that can be run without permanently installing or replacing an existing package, and can then simply be deleted once you no longer need them.

If you are eager and can build from source then you may be able to try this out more quickly.

wez avatar Aug 09 '22 04:08 wez

For the shapes I typically use (vertical split, and one horizontal split on one side), nightly definitely addresses my problem, thanks for the super quick turnaround!

But I figured I'd test a few scenarios and noticed that what appears to be the logically directional pane, doesn't appear to be what gets selected, once you have a symmetrical layout.

https://user-images.githubusercontent.com/701548/183634179-39c4b87b-5cf8-4413-87bb-4b15b4d55fac.mp4

So what's happening here, is I'm manually selecting the top left, and bottom right cells, and then navigating "up", "down", "left", and "right". Basically you can't get to any other panes directionally. I'm not certain if this would have been the behavior before (since I'm not certain how to downgrade to the specific version i was on before), or if this is a weird side-effect of the above fix.

My expectation would be:

  • coming from the top left pane, the bottom left two panes to be "down", and the selection between them to then be based on last access
  • coming from the bottom right pane, "up" would unambiguously mean the top right pane etc

If you click into, say, the middle bottom pane, it will correctly navigate "left" into the bottom left pane, but going right will end up being dependent on last access.

DanCardin avatar Aug 09 '22 11:08 DanCardin

cb75b642f should behave a bit better!

wez avatar Aug 20 '22 14:08 wez

Can confirm, in the most recent nightly everything appears to work as expected! Cheers!

DanCardin avatar Aug 21 '22 17:08 DanCardin

I'm going to lock this issue because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active issues. If you have found a problem that seems similar to this, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further.

github-actions[bot] avatar Feb 03 '23 20:02 github-actions[bot]