From 970a120f9bedda81188417631a3b43d39dc91841 Mon Sep 17 00:00:00 2001 From: David Kettler Date: Wed, 14 Mar 2012 14:04:38 +1030 Subject: [PATCH] Remove minibuffer annotation during minibuffer recursion When the minibuffer is called recursively, the minibuffer annotation should be hidden or updated appropriately. For instance, previously if "C-h c" was pressed while the annotation was shown during a hints interaction, the annotation would confusingly remain visible while the minibuffer prompted for a key. Now the annotation will be hidden until the user returns to the hints interaction. --- modules/hints.js | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/modules/hints.js b/modules/hints.js index 76694bd..41e73c9 100644 --- a/modules/hints.js +++ b/modules/hints.js @@ -424,7 +424,6 @@ hint_manager.prototype = { function hints_minibuffer_annotation (hints, window) { this.hints = hints; this.input = window.minibuffer.input_element; - this.input.annotate = true; } hints_minibuffer_annotation.prototype = { constructor: hints_minibuffer_annotation, @@ -456,7 +455,12 @@ hints_minibuffer_annotation.prototype = { this.input.annotation = s.join(" "); }, - destroy: function () { + load: function () { + this.input.annotate = true; + this.update(); + }, + + unload: function () { this.input.annotate = false; } }; @@ -510,7 +514,7 @@ hints_minibuffer_state.prototype = { } this.manager.update_valid_hints(); if (this.hints_minibuffer_annotation) - this.hints_minibuffer_annotation.update(); + this.hints_minibuffer_annotation.load(); }, clear_auto_exit_timer: function () { var window = this.minibuffer.window; @@ -522,13 +526,15 @@ hints_minibuffer_state.prototype = { unload: function () { this.clear_auto_exit_timer(); this.manager.hide_hints(); + if (this.hints_minibuffer_annotation) + this.hints_minibuffer_annotation.unload(); basic_minibuffer_state.prototype.unload.call(this); }, destroy: function () { this.clear_auto_exit_timer(); this.manager.remove(); if (this.hints_minibuffer_annotation) - this.hints_minibuffer_annotation.destroy(); + this.hints_minibuffer_annotation.unload(); basic_minibuffer_state.prototype.destroy.call(this); }, update_minibuffer: function (m) { -- 2.11.4.GIT