diff --git a/content/commands.js b/content/commands.js index 80ca8fcd..e31aedfe 100644 --- a/content/commands.js +++ b/content/commands.js @@ -1932,7 +1932,7 @@ vimperator.Commands = function () //{{{ else if (reset) vimperator.options.resetFirefoxPref(name); else if (invertBoolean) - vimperator.options.invertFirefoxBoolean(name); + vimperator.options.invertFirefoxPref(name); else if (matches[3]) { var value = matches[5]; diff --git a/content/completion.js b/content/completion.js index c3ec11f1..8146a88f 100644 --- a/content/completion.js +++ b/content/completion.js @@ -391,10 +391,12 @@ vimperator.Completion = function () //{{{ } for (var i = 0; i < prefArray.length; i++) + { if (!filter) optionCompletions.push([prefArray[i], vimperator.options.getFirefoxPref(prefArray[i])]); else optionCompletions.push([[prefArray[i]], vimperator.options.getFirefoxPref(prefArray[i])]); + } if (!filter) @@ -421,7 +423,7 @@ vimperator.Completion = function () //{{{ for (var option in vimperator.options) { if (option.hasName(filter)) - return [filter.length + 1, [[option.value, ""]]]; + return [filter.length + 1, [[option.value + "", ""]]]; } return [0, optionCompletions]; } diff --git a/content/options.js b/content/options.js index 5c9959e0..82ea8b6f 100644 --- a/content/options.js +++ b/content/options.js @@ -447,7 +447,9 @@ vimperator.Options = function () //{{{ { return firefoxBranch.clearUserPref(name); }, - invertFirefoxBoolean: function (name) + + // this works only for booleans + invertFirefoxPref: function (name) { if (firefoxBranch.getPrefType(name) == firefoxBranch.PREF_BOOL) this.setFirefoxPref(name, !this.getFirefoxPref(name));