Can't find appropriate command for tab moving

As you certainly noticed today is the day when I'm re-configuring some of my shortcuts and unfortunately I haven't had success to get my tab move shortcut working. I guess that the command doesn't do what it should do in all situations (particurlarly the "active" argument seems to be broken).

I use CTRL-M that should do two things for me:

Note:
[t] means topmost tab
[t*] means topmost and focussed tab

  1. The lister is not in dual mode but the source file display has two tabs: When pressing CTRL-M the lister should switch to dual mode and the active tab from the source should be moved to the destination and the other tab from the source should become active.

Before:
t1,[t2*]

After:
[t1*] | [t2]

  1. The lister is in dual mode and there are multiple tabs in the source file display: When pressing CTRL-M the active tab from the source should be moved to the destination (mostright and active) and the previous tab in the source should become active.

Before:
t1,t2,t3,[t4*] | t5,[t6]

After:
t1,t2,[t3*] | t5,t6,[t4]

The following command code should do the trick:

Go TABMOVE=active
Set SOURCE=Toggle 

But the "active" argument brings the moved tab to the front but doesn't makes it active as expected for case 2 but it does so for case 1.

So I have big problems to create a single command that works for both cases.

You can use @ifset:dual=on (or off) to check if it is a dual-display window and run the Set SOURCE=Toggle conditionally.

Ah nice workaround, that does it for me. :thumbsup:

There is one bug I noticed regarding to the "Go TABMOVE=active" command. If you move the last tab from the source to the destination file display the active tab isn't set correctly.

The screenshots below show the before / after situation. On the bottom screenshot the mostright tab should be active.




Can you confirm that this command script doesn't work as expected or is it some kind of problem with my configuration?

Maybe it is related to this problem too?

Confirmed.

In the next version (not sure when it will be yet), "Go TABMOVE=active" should make the tab active after moving the last tab.