zellij icon indicating copy to clipboard operation
zellij copied to clipboard

wrap around focus for both right and left directions

Open Kangaxx-0 opened this issue 2 years ago • 8 comments

Try to address #2071 and #1444

Wrap around pane focus if there is only one tab

How the fix works:

wraparound

  • [x] Run cargo xtask test

Kangaxx-0 avatar Mar 07 '23 22:03 Kangaxx-0

Hey, good job on this! I left some comments on the code. Also, if you could please merge from main?

I merged latest main

Kangaxx-0 avatar Mar 18 '23 19:03 Kangaxx-0

I've updated all your comments and it is ready to merge :)

Kangaxx-0 avatar Mar 20 '23 15:03 Kangaxx-0

@imsnif I do not why the local build did not see the break, I've fixed it, could you trigger the CI again, and help to merge it

Kangaxx-0 avatar Mar 28 '23 16:03 Kangaxx-0

No worries @Kangaxx-0 - I wish my availability was better, but there's lots to do in the project, so I appreciate your patience!

I think my main issue right now is with the while loop. I get where you're coming from about wanting to re-use existing logic in order to achieve this feature, but I'm not enthusiastic about overloading that function in this way. This can open us up to quite a few logic issues (an example that comes to mind is: what happens if there's a "wall" of unselectable panes in the middle of the screen?)

We keep track of the pane coordinates, as well as their size. We also know the screen size (display area and viewport) and can use them as well. Could we maybe use these in order to find the edges instead?

imsnif avatar Mar 29 '23 08:03 imsnif

No worries @Kangaxx-0 - I wish my availability was better, but there's lots to do in the project, so I appreciate your patience!

I think my main issue right now is with the while loop. I get where you're coming from about wanting to re-use existing logic in order to achieve this feature, but I'm not enthusiastic about overloading that function in this way. This can open us up to quite a few logic issues (an example that comes to mind is: what happens if there's a "wall" of unselectable panes in the middle of the screen?)

We keep track of the pane coordinates, as well as their size. We also know the screen size (display area and viewport) and can use them as well. Could we maybe use these in order to find the edges instead?

Hi @imsnif , I send a new iteration and change how to locate the edge pane based on your feedback, would you take a look

Kangaxx-0 avatar Mar 30 '23 00:03 Kangaxx-0

@imsnif My new iteration has been out one and half month. I do not mean to rush you, feel free to take a look and let me know if it is ok to land

Kangaxx-0 avatar May 22 '23 19:05 Kangaxx-0

Hey @Kangaxx-0 - I'm really sorry for taking so long to get to this and other PRs. It is definitely still on my TODO, but realistically I'm not sure when I'll manage to get to it. I'm doing considerably more than 100% and I absolutely have to triage and prioritize. I know this sucks, but things that are not on the roadmap (and these days, specifically have to do with my near+medium term for the plugin system) tend to get pushed back.

imsnif avatar May 22 '23 20:05 imsnif

Hey @Kangaxx-0 - I'm really sorry for taking so long to get to this and other PRs. It is definitely still on my TODO, but realistically I'm not sure when I'll manage to get to it. I'm doing considerably more than 100% and I absolutely have to triage and prioritize. I know this sucks, but things that are not on the roadmap (and these days, specifically have to do with my near+medium term for the plugin system) tend to get pushed back.

I totally understood ! Please take as much as time you need

Kangaxx-0 avatar May 22 '23 20:05 Kangaxx-0