aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--background_page.html10
-rw-r--r--options.html1
-rw-r--r--vimiumFrontend.js2
3 files changed, 13 insertions, 0 deletions
diff --git a/background_page.html b/background_page.html
index 6ec9f2af..978409bd 100644
--- a/background_page.html
+++ b/background_page.html
@@ -367,6 +367,16 @@
}
}
+ function refreshCompletionKeysAfterMappingSave() {
+ validFirstKeys = {};
+ singleKeyCommands = [];
+
+ populateValidFirstKeys();
+ populateSingleKeyCommands();
+
+ sendRequestToAllTabs({ name: "refreshCompletionKeys", completionKeys: generateCompletionKeys() });
+ }
+
/*
* Generates a list of keys that can complete a valid command given the current key queue or the one passed
* in.
diff --git a/options.html b/options.html
index 429fe3ea..6e6b1bc3 100644
--- a/options.html
+++ b/options.html
@@ -77,6 +77,7 @@
backgroundPage = chrome.extension.getBackgroundPage();
backgroundPage.clearKeyMappingsAndSetDefaults();
backgroundPage.parseCustomKeyMappings(value);
+ backgroundPage.refreshCompletionKeysAfterMappingSave();
}
};
diff --git a/vimiumFrontend.js b/vimiumFrontend.js
index 229da7e3..a5b50e6a 100644
--- a/vimiumFrontend.js
+++ b/vimiumFrontend.js
@@ -62,6 +62,8 @@ function initializePreDomReady() {
HUD.showUpgradeNotification(request.version);
else if (request.name == "showHelpDialog")
showHelpDialog(request.dialogHtml);
+ else if (request.name == "refreshCompletionKeys")
+ refreshCompletionKeys(request.completionKeys);
sendResponse({}); // Free up the resources used by this open connection.
});