mirror of
https://github.com/gryf/pentadactyl-pm.git
synced 2025-12-20 23:57:59 +01:00
Fix some bugs---which bugs, I have no idea.
This commit is contained in:
@@ -658,7 +658,11 @@ CompletionContext.prototype = {
|
|||||||
this.tabPressed = false;
|
this.tabPressed = false;
|
||||||
this.title = ["Completions"];
|
this.title = ["Completions"];
|
||||||
this.updateAsync = false;
|
this.updateAsync = false;
|
||||||
this.waitingForTab = false;
|
try
|
||||||
|
{
|
||||||
|
this.waitingForTab = false;
|
||||||
|
}
|
||||||
|
catch (e) {}
|
||||||
|
|
||||||
this.cancelAll();
|
this.cancelAll();
|
||||||
|
|
||||||
@@ -677,7 +681,11 @@ CompletionContext.prototype = {
|
|||||||
for each (let context in this.contexts)
|
for each (let context in this.contexts)
|
||||||
{
|
{
|
||||||
context.hasItems = false;
|
context.hasItems = false;
|
||||||
context.incomplete = false;
|
try
|
||||||
|
{
|
||||||
|
context.incomplete = false;
|
||||||
|
}
|
||||||
|
catch (e) {}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
@@ -685,8 +693,9 @@ CompletionContext.prototype = {
|
|||||||
* Wait for all subcontexts to complete.
|
* Wait for all subcontexts to complete.
|
||||||
*
|
*
|
||||||
* @param {boolean} interruptible When true, the call may be interrupted
|
* @param {boolean} interruptible When true, the call may be interrupted
|
||||||
* via <C-c>. In this case, "Interrupted" may be thrown.
|
* via <C-c>, in which case, "Interrupted" may be thrown.
|
||||||
* @param {number} timeout The maximum time, in milliseconds, to wait.
|
* @param {number} timeout The maximum time, in milliseconds, to wait.
|
||||||
|
* If 0 or null, wait indefinately.
|
||||||
*/
|
*/
|
||||||
wait: function wait(interruptable, timeout)
|
wait: function wait(interruptable, timeout)
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -1695,7 +1695,7 @@ function Events() //{{{
|
|||||||
{
|
{
|
||||||
setTimeout(statusline.updateUrl, 100);
|
setTimeout(statusline.updateUrl, 100);
|
||||||
},
|
},
|
||||||
setOverLink : function (link, b)
|
setOverLink: function (link, b)
|
||||||
{
|
{
|
||||||
let ssli = options["showstatuslinks"];
|
let ssli = options["showstatuslinks"];
|
||||||
if (link && ssli)
|
if (link && ssli)
|
||||||
@@ -1759,11 +1759,12 @@ function Events() //{{{
|
|||||||
|
|
||||||
window.XULBrowserWindow = self.progressListener;
|
window.XULBrowserWindow = self.progressListener;
|
||||||
window.QueryInterface(Ci.nsIInterfaceRequestor)
|
window.QueryInterface(Ci.nsIInterfaceRequestor)
|
||||||
.getInterface(Ci.nsIWebNavigation)
|
.getInterface(Ci.nsIWebNavigation)
|
||||||
.QueryInterface(Ci.nsIDocShellTreeItem).treeOwner
|
.QueryInterface(Ci.nsIDocShellTreeItem)
|
||||||
.QueryInterface(Ci.nsIInterfaceRequestor)
|
.treeOwner
|
||||||
.getInterface(Ci.nsIXULWindow)
|
.QueryInterface(Ci.nsIInterfaceRequestor)
|
||||||
.XULBrowserWindow = window.XULBrowserWindow;
|
.getInterface(Ci.nsIXULWindow)
|
||||||
|
.XULBrowserWindow = self.progressListener;
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
getBrowser().addProgressListener(self.progressListener, Ci.nsIWebProgress.NOTIFY_ALL);
|
getBrowser().addProgressListener(self.progressListener, Ci.nsIWebProgress.NOTIFY_ALL);
|
||||||
|
|||||||
@@ -623,6 +623,7 @@ function Tabs() //{{{
|
|||||||
completer: function (context)
|
completer: function (context)
|
||||||
{
|
{
|
||||||
context.anchored = false;
|
context.anchored = false;
|
||||||
|
context.compare = CompletionContext.Sort.unsorted;
|
||||||
context.keys = { text: function (item) item.state.entries[0].url, description: "title" };
|
context.keys = { text: function (item) item.state.entries[0].url, description: "title" };
|
||||||
context.completions = tabs.closedTabs;
|
context.completions = tabs.closedTabs;
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -1273,20 +1273,17 @@ function CommandLine() //{{{
|
|||||||
}
|
}
|
||||||
else if (event.type == "input")
|
else if (event.type == "input")
|
||||||
{
|
{
|
||||||
//liberator.dump("input: " + command);
|
|
||||||
this.resetCompletions();
|
this.resetCompletions();
|
||||||
liberator.triggerCallback("change", currentExtendedMode, command);
|
liberator.triggerCallback("change", currentExtendedMode, command);
|
||||||
}
|
}
|
||||||
else if (event.type == "keypress")
|
else if (event.type == "keypress")
|
||||||
{
|
{
|
||||||
|
let key = events.toString(event);
|
||||||
if (completions)
|
if (completions)
|
||||||
completions.previewClear();
|
completions.previewClear();
|
||||||
if (!currentExtendedMode)
|
if (!currentExtendedMode)
|
||||||
return true;
|
return true;
|
||||||
|
|
||||||
let key = events.toString(event);
|
|
||||||
//liberator.log("command line handling key: " + key + "\n");
|
|
||||||
|
|
||||||
// user pressed ENTER to carry out a command
|
// user pressed ENTER to carry out a command
|
||||||
// user pressing ESCAPE is handled in the global onEscape
|
// user pressing ESCAPE is handled in the global onEscape
|
||||||
// FIXME: <Esc> should trigger "cancel" event
|
// FIXME: <Esc> should trigger "cancel" event
|
||||||
|
|||||||
@@ -737,6 +737,7 @@ function History() //{{{
|
|||||||
context.anchored = false;
|
context.anchored = false;
|
||||||
context.completions = [sh.getEntryAtIndex(i, false) for (i in util.range(sh.index, 0, -1))];
|
context.completions = [sh.getEntryAtIndex(i, false) for (i in util.range(sh.index, 0, -1))];
|
||||||
context.keys = { text: function (item) item.URI.spec, description: "title" };
|
context.keys = { text: function (item) item.URI.spec, description: "title" };
|
||||||
|
context.compare = CompletionContext.Sort.unsorted;
|
||||||
},
|
},
|
||||||
count: true,
|
count: true,
|
||||||
literal: 0
|
literal: 0
|
||||||
@@ -783,6 +784,7 @@ function History() //{{{
|
|||||||
context.anchored = false;
|
context.anchored = false;
|
||||||
context.completions = [sh.getEntryAtIndex(i, false) for (i in util.range(sh.index + 1, sh.count))];
|
context.completions = [sh.getEntryAtIndex(i, false) for (i in util.range(sh.index + 1, sh.count))];
|
||||||
context.keys = { text: function (item) item.URI.spec, description: "title" };
|
context.keys = { text: function (item) item.URI.spec, description: "title" };
|
||||||
|
context.compare = CompletionContext.Sort.unsorted;
|
||||||
},
|
},
|
||||||
count: true,
|
count: true,
|
||||||
literal: 0
|
literal: 0
|
||||||
|
|||||||
Reference in New Issue
Block a user