mirror of
https://github.com/vale981/tridactyl
synced 2025-03-05 09:31:41 -05:00
Replace missing ramda funcs
This commit is contained in:
parent
9fe79529c7
commit
9cfb857f3c
3 changed files with 12 additions and 22 deletions
|
@ -5,7 +5,6 @@ import * as Containers from "@src/lib/containers"
|
|||
import * as Completions from "@src/completions"
|
||||
import * as config from "@src/lib/config"
|
||||
import * as Messaging from "@src/lib/messaging"
|
||||
import * as R from "rambda"
|
||||
|
||||
class BufferCompletionOption
|
||||
extends Completions.CompletionOptionHTML
|
||||
|
@ -238,11 +237,15 @@ export class BufferCompletionSource extends Completions.CompletionSourceFuse {
|
|||
if (!prevOptions || !this.options || !this.lastFocused) return
|
||||
|
||||
// Determine which option to focus on
|
||||
const diff = R.differenceWith(
|
||||
(x, y) => x.tabId === y.tabId,
|
||||
prevOptions,
|
||||
this.options,
|
||||
)
|
||||
const diff: BufferCompletionOption[] = []
|
||||
for (const prevOption of prevOptions) {
|
||||
if (
|
||||
!this.options.find(
|
||||
newOption => prevOption.tabId === newOption.tabId,
|
||||
)
|
||||
)
|
||||
diff.push(prevOption)
|
||||
}
|
||||
const lastFocusedTabCompletion = this
|
||||
.lastFocused as BufferCompletionOption
|
||||
|
||||
|
|
|
@ -91,7 +91,6 @@ import * as Native from "@src/lib/native"
|
|||
import * as TTS from "@src/lib/text_to_speech"
|
||||
import * as excmd_parser from "@src/parsers/exmode"
|
||||
import * as escape from "@src/lib/escape"
|
||||
import * as R from "rambda"
|
||||
import semverCompare from "semver-compare"
|
||||
import * as hint_util from "@src/lib/hint_util"
|
||||
import { OpenMode } from "@src/lib/hint_util"
|
||||
|
@ -2760,9 +2759,9 @@ export async function tabsort(...callbackchunks: string[]) {
|
|||
const comparator = argument == "--containers" ? (l, r) => l.cookieStoreId < r.cookieStoreId : argument == "--title" ? (l, r) => l.title < r.title : argument == "--url" || argument == "" ? (l, r) => l.url < r.url : eval(argument)
|
||||
const windowTabs = await browser.tabs.query({ currentWindow: true })
|
||||
windowTabs.sort(comparator)
|
||||
R.forEachObjIndexed((tab, index) => {
|
||||
browser.tabs.move((tab as browser.tabs.Tab).id, { index: parseInt(index as string, 10) })
|
||||
}, windowTabs)
|
||||
Object.entries(windowTabs).forEach(([index, tab]) => {
|
||||
browser.tabs.move(tab.id, { index: parseInt(index, 10) })
|
||||
})
|
||||
}
|
||||
|
||||
/** Pin the current tab */
|
||||
|
|
12
yarn.lock
12
yarn.lock
|
@ -797,13 +797,6 @@
|
|||
resolved "https://registry.yarnpkg.com/@types/prettier/-/prettier-1.19.1.tgz#33509849f8e679e4add158959fdb086440e9553f"
|
||||
integrity sha512-5qOlnZscTn4xxM5MeGXAMOsIOIKIbh9e85zJWfBRVPlRMEVawzoPhINYbRGkBZCI8LxvBe7tJCdWiarA99OZfQ==
|
||||
|
||||
"@types/ramda@^0.27.37":
|
||||
version "0.27.37"
|
||||
resolved "https://registry.yarnpkg.com/@types/ramda/-/ramda-0.27.37.tgz#5ebc0672ccfb6b3451082584fa2529ff7de472cf"
|
||||
integrity sha512-v5DEc/GEk197BL1RTn2jyq4TTCZFmlu84+M+MCXuRjVGkIwSmmsy34lAFrOielABqKg0RePNnskbA9vCpQ6diw==
|
||||
dependencies:
|
||||
ts-toolbelt "^6.15.1"
|
||||
|
||||
"@types/selenium-webdriver@^4.0.12":
|
||||
version "4.0.12"
|
||||
resolved "https://registry.yarnpkg.com/@types/selenium-webdriver/-/selenium-webdriver-4.0.12.tgz#5d5ab3f104be767ddbc84e3b97ba08e31c61d63c"
|
||||
|
@ -7129,11 +7122,6 @@ ts-node@^9.1.1:
|
|||
source-map-support "^0.5.17"
|
||||
yn "3.1.1"
|
||||
|
||||
ts-toolbelt@^6.15.1:
|
||||
version "6.15.5"
|
||||
resolved "https://registry.yarnpkg.com/ts-toolbelt/-/ts-toolbelt-6.15.5.tgz#cb3b43ed725cb63644782c64fbcad7d8f28c0a83"
|
||||
integrity sha512-FZIXf1ksVyLcfr7M317jbB67XFJhOO1YqdTcuGaq9q5jLUoTikukZ+98TPjKiP2jC5CgmYdWWYs0s2nLSU0/1A==
|
||||
|
||||
tsconfig-paths-webpack-plugin@^3.5.1:
|
||||
version "3.5.1"
|
||||
resolved "https://registry.yarnpkg.com/tsconfig-paths-webpack-plugin/-/tsconfig-paths-webpack-plugin-3.5.1.tgz#e4dbf492a20dca9caab60086ddacb703afc2b726"
|
||||
|
|
Loading…
Add table
Reference in a new issue