From 035ff4b12e72faf92e9a183618a46c2c04e13bf6 Mon Sep 17 00:00:00 2001 From: Doug Kearns Date: Sat, 24 Nov 2007 13:37:02 +0000 Subject: [PATCH] fix v.hints.currentState and hintedElements properties being called as functions --- content/events.js | 4 ++-- content/hints.js | 8 ++++---- content/mappings.js | 2 +- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/content/events.js b/content/events.js index 235a458d..49af5b23 100644 --- a/content/events.js +++ b/content/events.js @@ -541,7 +541,7 @@ vimperator.Events = function () //{{{ var map = vimperator.mappings.get(vimperator.modes.HINTS, key); if (map) { - if (map.alwaysActive || vimperator.hints.currentState() == 1) + if (map.alwaysActive || vimperator.hints.currentState == 1) { map.execute(null, vimperator.input.count); if (map.cancelMode) // stop processing this event @@ -562,7 +562,7 @@ vimperator.Events = function () //{{{ } // no mapping found, beep() - if (vimperator.hints.currentState() == 1) + if (vimperator.hints.currentState == 1) { vimperator.beep(); vimperator.hints.disableHahMode(); diff --git a/content/hints.js b/content/hints.js index 7a3a6742..7e130d07 100644 --- a/content/hints.js +++ b/content/hints.js @@ -453,7 +453,7 @@ vimperator.Hints = function () //{{{ get hintedElements() { return hintedElems; }, get currentState() { return state; }, - get setCurrentState(s) { state = s; }, + set currentState(s) { state = s; }, loadCoord: function (winId, i) { @@ -609,7 +609,7 @@ vimperator.Hints = function () //{{{ yankUrlHints: function () { var loc = ""; - var elems = this.hintedElements(); + var elems = this.hintedElements; var tmp = ""; for (var i = 0; i < elems.length; i++) { @@ -632,7 +632,7 @@ vimperator.Hints = function () //{{{ yankTextHints: function () { var loc = ""; - var elems = this.hintedElements(); + var elems = this.hintedElements; var tmp = ""; for (var i = 0; i < elems.length; i++) { @@ -654,7 +654,7 @@ vimperator.Hints = function () //{{{ saveHints: function (skipPrompt) { - var elems = this.hintedElements(); + var elems = this.hintedElements; for (var i = 0; i < elems.length; i++) { diff --git a/content/mappings.js b/content/mappings.js index ca82161a..4b01dd97 100644 --- a/content/mappings.js +++ b/content/mappings.js @@ -1079,7 +1079,7 @@ vimperator.Mappings = function () //{{{ } )); addDefaultMap(new vimperator.Map(vimperator.modes.HINTS, [","], - function () { vimperator.input.buffer += ","; vimperator.hints.setCurrentState(0); }, + function () { vimperator.input.buffer += ","; vimperator.hints.currentState = 0; }, { cancelMode: false, alwaysActive: true