Merge pull request #998 from glacambre/fix_tabopenpos_last

Respect the tabs.move/tabs.create API
This commit is contained in:
Oliver Blanthorn 2018-09-10 10:34:04 +01:00 committed by GitHub
commit 9450798006
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 2 deletions

View file

@ -338,7 +338,7 @@ export async function nativeopen(url: string, ...firefoxArgs: string[]) {
let index = (await activeTab()).index + 1
switch (pos) {
case "last":
index = 99999
index = -1
break
case "related":
// How do we simulate that?

View file

@ -114,7 +114,7 @@ export async function openInNewTab(
break
case "last":
// Infinity can't be serialised, apparently.
options.index = 99999
options.index = (await browserBg.tabs.query({currentWindow: true})).length
break
case "related":
if (await firefoxVersionAtLeast(57)) {