mirror of
https://github.com/vale981/tridactyl
synced 2025-03-05 17:41:40 -05:00
excmds.ts: Make tabprev synchronous
This fixes https://github.com/cmcaine/tridactyl/issues/783.
This commit is contained in:
parent
64a494adb8
commit
c2d5f27394
1 changed files with 3 additions and 3 deletions
|
@ -536,7 +536,7 @@ export function forceURI(maybeURI: string): string {
|
|||
/** @hidden */
|
||||
//#background_helper
|
||||
function tabSetActive(id: number) {
|
||||
browser.tabs.update(id, { active: true })
|
||||
return browser.tabs.update(id, { active: true })
|
||||
}
|
||||
|
||||
// }}}
|
||||
|
@ -1451,7 +1451,7 @@ export function focusbyid(id: string) {
|
|||
/** @hidden */
|
||||
//#background_helper
|
||||
async function tabIndexSetActive(index: number | string) {
|
||||
tabSetActive(await idFromIndex(index))
|
||||
return tabSetActive(await idFromIndex(index))
|
||||
}
|
||||
|
||||
/** Switch to the next tab, wrapping round.
|
||||
|
@ -1485,7 +1485,7 @@ export async function tabnext_gt(index?: number) {
|
|||
*/
|
||||
//#background
|
||||
export async function tabprev(increment = 1) {
|
||||
tabIndexSetActive((await activeTab()).index - increment + 1)
|
||||
return tabIndexSetActive((await activeTab()).index - increment + 1)
|
||||
}
|
||||
|
||||
/** Switch to the first tab. */
|
||||
|
|
Loading…
Add table
Reference in a new issue