Skip to content

Commit 0d17ac0

Browse files
committed
feat: mouse: tabs preselect: make it possible to skip unloaded tabs
1 parent e867259 commit 0d17ac0

File tree

2 files changed

+3
-1
lines changed

2 files changed

+3
-1
lines changed

src/page.setup/components/settings.mouse.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ section(ref="el")
3232
ToggleField(
3333
label="settings.scroll_through_tabs_skip_discarded"
3434
v-model:value="Settings.state.scrollThroughTabsSkipDiscarded"
35-
:inactive="Settings.state.scrollThroughTabs === 'none' || Settings.state.scrollThroughTabs === 'psp' || Settings.state.scrollThroughTabs === 'psg'"
35+
:inactive="Settings.state.scrollThroughTabs === 'none'"
3636
@update:value="Settings.saveDebounced(150)")
3737
ToggleField(
3838
label="settings.scroll_through_tabs_except_overflow"

src/services/tabs.fg.actions.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -987,6 +987,7 @@ export function switchTabWithPreselect(globaly: boolean, cycle: boolean, dir: 1
987987
if (!tabs.length) return
988988

989989
const selIsSet = Selection.isSet()
990+
const skipDiscarded = Settings.state.scrollThroughTabsSkipDiscarded
990991
let target: Tab | undefined
991992

992993
if (Settings.state.scrollThroughTabsPreselAct && !selIsSet) {
@@ -1003,6 +1004,7 @@ export function switchTabWithPreselect(globaly: boolean, cycle: boolean, dir: 1
10031004
let afterSel = false
10041005
const tabFinder = (tab: Tab) => {
10051006
if (tab.invisible) return false
1007+
if (skipDiscarded && tab.discarded) return false
10061008
if (afterSel) return true
10071009
if ((selIsSet && tab.sel) || (!selIsSet && tab.active)) afterSel = true
10081010
}

0 commit comments

Comments
 (0)