1
0
mirror of https://github.com/gryf/pentadactyl-pm.git synced 2025-12-20 12:27:58 +01:00

Cleanup some docs. Fix completion sizing bug.

This commit is contained in:
Kris Maglione
2009-01-10 23:15:33 -05:00
parent f7accd657a
commit de9e366f12
3 changed files with 50 additions and 21 deletions

View File

@@ -1596,6 +1596,13 @@ function CommandLine() //{{{
}
},
getSpaceNeeded: function getSpaceNeeded()
{
let rect = commandlineWidget.getBoundingClientRect();
let offset = rect.bottom - window.innerHeight;
return Math.max(0, offset);
},
/**
* Update or remove the multiline output widget's "MORE" prompt.
*
@@ -1635,13 +1642,13 @@ function CommandLine() //{{{
let doc = multilineOutputWidget.contentDocument;
// The container needs to be collapsed for this calculation to work.
outputContainer.collapsed = true;
let availableHeight = 250;
try
{
availableHeight = getBrowser().mPanelContainer ?
getBrowser().mPanelContainer.boxObject.height : getBrowser().boxObject.height;
if (!outputContainer.collapsed)
availableHeight += outputContainer.height;
}
catch (e) {}
doc.body.style.minWidth = commandlineWidget.scrollWidth + "px";
@@ -1723,6 +1730,7 @@ function ItemList(id) //{{{
div.style.minWidth = "";
// FIXME: Belongs elsewhere.
commandline.updateOutputHeight(false);
container.height -= commandline.getSpaceNeeded();
}
function getCompletion(index) completionElements.snapshotItem(index - startIndex);