excmds.ts: Fix setpref breaking user.js when value contains spaces

Before this commit, `:setpref my_pref "my value"` broke user.js by only
writing '"my' to the file. This created a syntax error and prevented
firefox from reading the rest of the file. This commit fixes that.
This commit is contained in:
glacambre 2018-10-27 13:20:18 +02:00
parent 8644e06f21
commit 26169efea1
No known key found for this signature in database
GPG key ID: B9625DB1767553AC

View file

@ -805,8 +805,8 @@ export async function colourscheme(themename: string) {
* `setpref extensions.webextensions.restricterDomains ""`
*/
//#background
export async function setpref(key: string, value: string) {
await Native.writePref(key, value)
export async function setpref(key: string, ...value: string[]) {
await Native.writePref(key, value.join(" "))
}
/**