Close last tab in 2nd pane should hide 2ndpane (insted of showing tab cannot be closed)

Features wanted...
Post Reply
Yogui
Posts: 18
Joined: 21 Jul 2011 14:44

Close last tab in 2nd pane should hide 2ndpane (insted of showing tab cannot be closed)

Post by Yogui »

When closing the last tab in 2nd pane do hide the 2nd pane (insted of showing cannot be closed message box)

May be add an option "close pane instead of last tab" in the Configuration "Tabs and Panes" > "Dual Pane"
Last edited by Yogui on 22 Jun 2022 00:47, edited 2 times in total.
Thanks, Yogui

RalphM
Posts: 1911
Joined: 27 Jan 2005 23:38
Location: Cairns, Australia

Re: Close last tab in 2nd panel to close panel (insted of showing cannot be closed)

Post by RalphM »

It is a dual pane file manager and each pane has at least one tab.
Ralph :)
(OS: W11 22H2 Home x64 - XY: Current beta - Office 2019 32-bit - Display: 1920x1080 @ 125%)

Yogui
Posts: 18
Joined: 21 Jul 2011 14:44

Re: Close last tab in 2nd pane should hide 2ndpane (insted of showing tab cannot be closed)

Post by Yogui »

Thanks RalpM,
I corrected the post grammar panel for pane
and close for hide

The wish is that:
closing the last tab in 2nd pane will hide the 2nd pane (leaving the tab as part of the 2nd pane that can shown again)
(insted of showing tab cannot be closed message box)
Thanks, Yogui

Evolve
Posts: 353
Joined: 27 Feb 2020 09:48

Re: Close last tab in 2nd pane should hide 2ndpane (insted of showing tab cannot be closed)

Post by Evolve »

If you close your tabs with a middle-click (mouse wheel) as I do (don't even have [x] close button on them), then you can assign a script that will do what you want. Here is how.

Tools - Configuration - General - Custom Event Action - Clicking on Tabs - Middle-click on tab
In "Action" select "Run script", in "Script" type:

Code: Select all

load 'close_tab';
Press OK.
File - Save Settings.
Then go to XY scripts folder (you can get there by typing <xyscripts> in the address bar and pressing enter) and create a script file close_tab.xys containing this script:

Code: Select all

 $num_of_tabs = tab("get", "index", -1);
 $pane = get("pane");
 if ($pane == 2 && $num_of_tabs == 1 ){
		#802;
		#800;
	} else {
		tab("close",,indexatpos());
	}

Yogui
Posts: 18
Joined: 21 Jul 2011 14:44

Re: Close last tab in 2nd pane should hide 2ndpane (insted of showing tab cannot be closed)

Post by Yogui »

Awsome :appl:

I wanted this for a while as I keep closing the tab and msgbox... before properly closing the pane :roll:
Thanks, Yogui

Yogui
Posts: 18
Joined: 21 Jul 2011 14:44

Re: Close last tab in 2nd pane should hide 2ndpane (insted of showing tab cannot be closed)

Post by Yogui »

A small update, after updating to version 25.3 the script stopped working
as the tab("get", "index") needed -1 parameter removed fixed
updated script below, thanks!!

Code: Select all

 if (get("pane") == 2 && tab("get", "index") == 1 )
	{
		#802;
		#800;
	} else {
		tab("close",,indexatpos());
	}
Thanks, Yogui

Post Reply