When the minibuffer is called recursively, the minibuffer annotation
must 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.

---

Sorry that I didn't notice this earlier.

It may be better to manage this in minibuffer_input_state so that it
works transparently for any future uses of the annotation.  However, I
haven't got that to work and it also felt like crossing an abstraction
boundary.

A separate problem I noticed while looking into this, but is
independent of the annotation.  While in a hints interaction press
"C-h f C-g"; you are returned to the hints interaction, but the
minibuffer displays "Quit" and does not return to the hints prompt.
---
 modules/hints.js |   14 ++++++++++----
 1 files 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) {
-- 
1.7.9.1

_______________________________________________
Conkeror mailing list
[email protected]
https://www.mozdev.org/mailman/listinfo/conkeror

Reply via email to