Merge pull request #1944 from tridactyl/rapid_yanking

Fix #1374: hint -qy now merges its arguments
This commit is contained in:
Oliver Blanthorn 2019-10-25 16:45:19 +01:00 committed by GitHub
commit 838dc22b13
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -3759,6 +3759,12 @@ export async function hint(option?: string, selectors?: string, ...rest: string[
option = option.slice(0, pipeIndex) + option.slice(pipeIndex + 1)
}
// Hacky fix for #1374 - join rapid-hinted yanks
if (option === "-qy") {
run_exstr('composite hint -qpipe a href | js -p JS_ARG.join(" ") | yank')
return
}
const options = new Set(option.length ? option.slice(1).split("") : [])
const rapid = options.delete("q")
const jshints = !options.delete("J")