From 8452f87562beb69fa9e978b8e7db278413ef4fbc Mon Sep 17 00:00:00 2001 From: John Foerch Date: Tue, 4 May 2010 22:50:39 -0400 Subject: [PATCH] key_binding_reader: protect current keymap stack It is possible for the keymap stack to change while the minibuffer is open reading a key binding for describe-key or describe-key-briefly. This patch makes key_binding_reader clone the keymap stack, instead of assuming it won't change. I was able to reproduce the problem by focusing a text box and doing 'C-h c C-x u' but I cannot guarantee that this will reliably show the bug for everyone. Tested in XulRunner 1.9.2.4pre. --- modules/keymap.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/keymap.js b/modules/keymap.js index b3957d6..516e77c 100644 --- a/modules/keymap.js +++ b/modules/keymap.js @@ -525,7 +525,7 @@ function key_binding_reader (window, continuation) { if (arguments.$keymap) this.target_keymap = arguments.$keymap; else - this.target_keymap = get_current_keymaps(window); + this.target_keymap = get_current_keymaps(window).slice(); this.key_sequence = []; -- 2.11.4.GIT