Closed evandrocoan closed 7 years ago
Please post TabExtra settings.
{
// By default TabsExtra forgets a tab's "stickiness" when
// any "tab close" command is issued. You can make the tab's
// "Stickiness" persist by enabling the following feature.
"persistent_sticky": true,
// If active window gets closed, default to (left|right|last_active)
"fallback_focus": "right",
// Experimental: When opening a view, where should it be spawned at (none|left|active_left|active_right|right)
"spawn_view": "none",
// Menu layout include or exclude, in whatever order you desire, the following options:
// ["close", "sticky", "open", "clone", "save", "delete", "rename", "reveal", "path", "revert", "sort"]
// When done, go to Preferences->Package Settings->TabsExtra and Install/Upgrade either
// the default TabsMenu or the Override Menu which overrides the "Default" package's menu.
"menu_layout": ["open", "save", "delete", "rename", "revert"],
// Define sort layout. Each entry contains:
// "module": plugin that defines what view meta data is used to sort
// "caption": menu name for entry
// "reverse": (optional) sort tabs in the reverse (true|false)
"sort_layout": [
{"module": "TabsExtra.sort.name", "caption": "Name"},
{"module": "TabsExtra.sort.path", "caption": "Path"},
{"module": "TabsExtra.sort.modified", "caption": "Modified"},
{"module": "TabsExtra.sort.created", "caption": "Created"},
{"module": "TabsExtra.sort.type", "caption": "Extension"},
{"module": "TabsExtra.sort.size", "caption": "Size"},
{"module": "TabsExtra.sort.activated", "caption": "Last Activated"},
{"module": "TabsExtra.sort.syntax", "caption": "Syntax"},
{"module": "TabsExtra.sort.reverse", "caption": "Reverse Order"}
],
// When sorting, normal strings will be sorted numerically.
//
// Example (non-numerical sort):
// test12 test2 test1 => test1 test12 test2
//
// Example (numerical sort):
// test12 test2 test1 => test1 test2 test12
"numeric_sort": false,
// Sort tabs when a file is opened or saved
"sort_on_load_save": false,
// Sort module to use when sorting on load and save
// "module": plugin that defines what view meta data is used to sort
// "reverse": (optional) sort tabs in the reverse (true|false)
"sort_on_load_save_command": {"module": "TabsExtra.sort.name"}
}
Did you notice the fallback_focus setting? Tab Extra does have known focus side effects, but this isn't one of them.
😱 I set it to "fallback_focus": "last_active",
and it stopped doing that!
But it says If active window gets closed
, not view?
I mess up my documentation a lot.
Hopefully it is correct on the official doc site.
Uhum, thanks! This feature solves this feature request on the Sublime Text core:
But I think it seems a bug, because it is changing the current view focus to left|right
when some third unfocused view is closed, and the setting fallback_focus
is set to left|right
. When the setting fallback_focus
is set to last_active
it does indeed works correctly for these cases.
It should change to left|right
only when the current view is closed, not some unfocused one.
Is it different when clicking the x vs right clicking the tab and selecting close?
It is not closing when I select close. This is my close command entry:
{ "command": "close_by_index", "args": { "group": -1, "index": -1 }, "caption": "Close" },
Update:
I just noticed I had did bulk packages enable/disable while I was looking for the package creating this behavior, and the menus entries were not working correctly.
I after restarting Sublime Text, it started working again. When I close with the menu, it is working correctly.
I after restarting Sublime Text, it started working again. When I close with the menu, it is working correctly.
Great this is expected. The reason why the x
closing doesn't work is because I cannot override that close behavior. The x
button uses a close method that does not pass through the API, so I cannot fix that unfortunately. Tab focusing is a big hack, and as mentioned before, there are some side effects tracked in #44, and there are some issues I just cannot fix.
I opened an issue on Sublime Text Core, asking about this fix.
As there is currently no actionable item here, I will close this issue.
Originally posted on:
Initially I tough it was Sublime Text fault, but after studying it better I narrowed it down to this package.
Summary
When I got like 3 tabs opened, and I am focused on tab number 3, and close the tab number 1, the tab number 2 is focused (bad):
Expected behavior
On this case, Sublime Text should not change my current tab. My current tab should stay focused. Just because I am closing another unfocused tab, my current tab focus should not be changed to
the neighboring tab
mentioned on the change log:https://www.sublimetext.com/2to3
Actual behavior
Sublime Text is changing my current focused tab, when some unfocused tab is closed. If this the desired behavior, I would like a setting to disable this, as it is somewhat annoying.
Steps to reproduce
Environment
dpi_scale
used in ST 1.0Related issues: