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

fixed custom completion styling, now better than ever before, per-item based. Note that hold <tab> down after :bmarks <tab> results in a sluggish display, I don't think this commit causes this, it's proably a recent regression.

This commit is contained in:
Martin Stubenschrott
2008-11-21 00:14:14 +00:00
parent 00f4b80232
commit df6a9a9428
2 changed files with 42 additions and 6 deletions

View File

@@ -1373,8 +1373,6 @@ function ItemList(id) //{{{
if (offset == null || offset - startIndex == 0 || offset < 0 || items.length && offset >= items.length)
return;
//let createRow = ("createRow" in completionObject) ? completionObject.createRow : createDefaultRow;
let createRow = createDefaultRow;
startIndex = offset;
endIndex = Math.min(startIndex + maxItems, items.length);
@@ -1385,14 +1383,14 @@ function ItemList(id) //{{{
if (diff == 1) /* Scroll down */
{
let item = items[endIndex - 1];
let row = createRow(item, true);
let row = "html" in item ? util.xmlToDom(item.html, doc) : createDefaultRow(item, true);
tbody.removeChild(tbody.firstChild);
tbody.appendChild(row);
}
else /* Scroll up */
{
let item = items[offset];
let row = createRow(item, true);
let row = "html" in item ? util.xmlToDom(item.html, doc) : createDefaultRow(item, true);
tbody.removeChild(tbody.lastChild);
tbody.insertBefore(row, tbody.firstChild);
}
@@ -1406,7 +1404,7 @@ function ItemList(id) //{{{
<div class="hl-Completions">
{
template.map(util.range(offset, endIndex), function (i)
createRow(items[i]))
"html" in items[i] ? items[i].html : createDefaultRow(items[i]))
}
</div>
<div class="hl-Completions">