mirror of
https://github.com/vale981/tridactyl
synced 2025-03-04 17:11:40 -05:00
Fix #4603: tabgrab with one tab
This commit is contained in:
parent
1c7eb0eebc
commit
9c8006107e
1 changed files with 3 additions and 7 deletions
|
@ -1,5 +1,5 @@
|
|||
import * as Perf from "@src/perf"
|
||||
import { browserBg } from "@src/lib/webext"
|
||||
import { browserBg, prevActiveTab } from "@src/lib/webext"
|
||||
import * as Containers from "@src/lib/containers"
|
||||
import * as Completions from "@src/completions"
|
||||
import * as Messaging from "@src/lib/messaging"
|
||||
|
@ -189,11 +189,7 @@ export class TabAllCompletionSource extends Completions.CompletionSourceFuse {
|
|||
return a.windowId - b.windowId
|
||||
})
|
||||
|
||||
const currentWindowTabs = await browserBg.tabs.query({
|
||||
currentWindow: true,
|
||||
})
|
||||
currentWindowTabs.sort((a, b) => b.lastAccessed - a.lastAccessed)
|
||||
const altTab = currentWindowTabs[1]
|
||||
const altTab = await prevActiveTab()
|
||||
|
||||
// Check to see if this is a command that needs to exclude the current
|
||||
// window
|
||||
|
@ -219,7 +215,7 @@ export class TabAllCompletionSource extends Completions.CompletionSourceFuse {
|
|||
tab.index === altTab.index &&
|
||||
tab.windowId === altTab.windowId,
|
||||
tab.active &&
|
||||
tab.windowId === currentWindowTabs[0].windowId,
|
||||
tab.windowId === currentWindow.id,
|
||||
winindex,
|
||||
await Containers.getFromId(tab.cookieStoreId),
|
||||
windows[tab.windowId].incognito,
|
||||
|
|
Loading…
Add table
Reference in a new issue