mirror of
https://github.com/vale981/tridactyl
synced 2025-03-05 09:31:41 -05:00
Merge pull request #4344 from GHolk/undo-complete-url
Add fuse search in undo and fix undo session id is undefind
This commit is contained in:
commit
e5ed0d4c9e
2 changed files with 3 additions and 3 deletions
|
@ -52,7 +52,7 @@ class SessionCompletionOption
|
||||||
this.value = (session.tab || session.window).sessionId
|
this.value = (session.tab || session.window).sessionId
|
||||||
const [howLong, qualifier] = computeDate(session)
|
const [howLong, qualifier] = computeDate(session)
|
||||||
const [tab, extraInfo] = getTabInfo(session)
|
const [tab, extraInfo] = getTabInfo(session)
|
||||||
this.fuseKeys.push(tab.title)
|
this.fuseKeys.push(tab.title, tab.url)
|
||||||
this.html = html`<tr class="SessionCompletionOption option">
|
this.html = html`<tr class="SessionCompletionOption option">
|
||||||
<td class="type">${session.tab ? "T" : "W"}</td>
|
<td class="type">${session.tab ? "T" : "W"}</td>
|
||||||
<td class="time">${howLong}${qualifier}</td>
|
<td class="time">${howLong}${qualifier}</td>
|
||||||
|
|
|
@ -3030,8 +3030,8 @@ export async function undo(item = "recent"): Promise<number> {
|
||||||
const session = sessions.find(predicate)
|
const session = sessions.find(predicate)
|
||||||
|
|
||||||
if (session) {
|
if (session) {
|
||||||
browser.sessions.restore((session.tab || session.window).sessionId)
|
const restore = await browser.sessions.restore((session.tab || session.window).sessionId)
|
||||||
return (session.tab || session.window).id
|
return (restore.tab || restore.window).id
|
||||||
}
|
}
|
||||||
return -1
|
return -1
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue