1
0
mirror of https://github.com/gryf/pentadactyl-pm.git synced 2025-12-23 10:18:00 +01:00

Make completion display less jittery.

This commit is contained in:
Kris Maglione
2008-10-09 19:02:13 +00:00
parent 9644eca6a9
commit 53bd7a6bc1
2 changed files with 26 additions and 31 deletions

View File

@@ -1226,6 +1226,7 @@ liberator.ItemList = function (id) //{{{
var container = iframe.parentNode;
doc.body.id = id + "-content";
doc.body.appendChild(doc.createTextNode(""));
var completions = []; // a reference to the Array of completions
var startIndex = -1; // The index of the first displayed item
@@ -1316,7 +1317,6 @@ liberator.ItemList = function (id) //{{{
}
// do a full refill of the list:
doc.body.innerHTML = "";
XML.ignoreWhitespace = true;
let div = <div class="ex-command-output hl-Normal">
@@ -1326,10 +1326,8 @@ liberator.ItemList = function (id) //{{{
let tbody = div..tbody;
for (let i in liberator.util.range(offset, endIndex))
{
let elem = completions[i];
tbody.* += createRow(elem[0], elem[1], elem[2]);
}
tbody.* += createRow.apply(null, completions[i]);
div.* +=
<table>
{
@@ -1341,7 +1339,7 @@ liberator.ItemList = function (id) //{{{
let dom = liberator.util.xmlToDom(div, doc);
completionBody = dom.getElementsByTagName("tbody")[0];
completionElements = completionBody.childNodes;
doc.body.appendChild(dom);
doc.body.replaceChild(dom, doc.body.firstChild);
}
/////////////////////////////////////////////////////////////////////////////}}}