1
0
mirror of https://github.com/gryf/pentadactyl-pm.git synced 2026-01-07 01:54:12 +01:00

Don't force help initialization until we see something that looks like a help link. Other small interface changes.

This commit is contained in:
Kris Maglione
2011-01-21 05:27:15 -05:00
parent 2af9754509
commit d71320aa09
8 changed files with 68 additions and 47 deletions

View File

@@ -87,7 +87,10 @@ var RangeFinder = Module("rangefinder", {
find: function (pattern, backwards) {
let str = this.bootstrap(pattern, backwards);
if (!this.rangeFind.find(str))
this.timeout(function () { this.dactyl.echoerr("E486: Pattern not found: " + pattern); }, 0);
this.timeout(function () {
this.dactyl.echoerr("E486: Pattern not found: " + pattern,
this.commandline.FORCE_SINGLELINE);
});
return this.rangeFind.found;
},
@@ -96,7 +99,8 @@ var RangeFinder = Module("rangefinder", {
if (!this.rangeFind || this.rangeFind.stale)
this.find(this.lastFindPattern);
else if (!this.rangeFind.find(null, reverse))
this.dactyl.echoerr("E486: Pattern not found: " + this.lastFindPattern);
this.dactyl.echoerr("E486: Pattern not found: " + this.lastFindPattern,
this.commandline.FORCE_SINGLELINE);
else if (this.rangeFind.wrapped)
// hack needed, because wrapping causes a "scroll" event which
// clears our command line
@@ -380,7 +384,7 @@ var RangeFind = Class("RangeFind", {
focus: function () {
if (this.lastRange)
var node = util.evaluateXPath(RangeFind.selectNodePath, this.range.document,
var node = util.evaluateXPath(RangeFind.selectNodePath,
this.lastRange.commonAncestorContainer).snapshotItem(0);
if (node) {
node.focus()