The panel was previously placed above the minibuffer, which
unnecessarily obscures part of the content buffer.  A wide input area
is not needed for a hints interaction because the input will normally
be short.  The panel is now placed to the right of the input, so that
no extra vertical space is used.

Fixes http://bugs.conkeror.org/issue343

todo:
  - Should this be optional?
  - Cleaner method of fixing the width.
---
 modules/hints.js |    5 +++--
 1 files changed, 3 insertions(+), 2 deletions(-)

diff --git a/modules/hints.js b/modules/hints.js
index 67720d0..c9f41ee 100644
--- a/modules/hints.js
+++ b/modules/hints.js
@@ -409,12 +409,13 @@ hint_manager.prototype = {
 /* Show panel with currently selected URL. */
 function hints_url_panel (hints, window) {
     var g = new dom_generator(window.document, XUL_NS);
+    var w = 0.75 * window.minibuffer.element.clientWidth;
 
     var p = g.element("hbox", "class", "panel url", "flex", "0");
     g.element("label", p, "value", "URL:", "class", "url-panel-label");
     var url_value = g.element("label", p, "class", "url-panel-value",
-                              "crop", "end", "flex", "1");
-    window.minibuffer.insert_before(p);
+                              "crop", "end", "flex", "1", "width", w);
+    window.minibuffer.element.insertBefore(p, null);
 
     p.update = function () {
        url_value.value = "";
-- 
1.7.4.4

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

Reply via email to