mirror of
https://github.com/gryf/pentadactyl-pm.git
synced 2025-12-21 20:07:59 +01:00
commands in the -- more -- prompt are now passed to vimperator if they don't make sense in the MOW
This commit is contained in:
@@ -222,6 +222,8 @@ function Buffer() //{{{
|
||||
|
||||
[number, title] = items[i][0].split(/:\s+/, 2);
|
||||
url = items[i][1];
|
||||
url = url.replace(/>/, ">").replace(/</, "<");
|
||||
title = title.replace(/>/, ">").replace(/</, "<");
|
||||
|
||||
list += "<tr><td align=\"right\"> " + number + "</td><td>" + indicator + "</td><td>" + title + "</td><td><span style=\"color: green\">" + url + "</span></td></tr>";
|
||||
}
|
||||
|
||||
@@ -129,7 +129,9 @@ function Search() //{{{
|
||||
}
|
||||
|
||||
var leader = lastsearch_backwards ? "?" : "/";
|
||||
vimperator.commandline.echo(leader + lastsearch);
|
||||
setTimeout(function() {
|
||||
vimperator.commandline.echo(leader + lastsearch);
|
||||
}, 10);
|
||||
|
||||
var up = reverse ? !lastsearch_backwards : lastsearch_backwards;
|
||||
var result = getBrowser().fastFind.findAgain(up, false);
|
||||
|
||||
@@ -133,9 +133,9 @@ vimperator.modes = (function()
|
||||
MENU: 1 << 18, // a popupmenu is active
|
||||
LINE: 1 << 19, // linewise visual mode
|
||||
|
||||
reset: function()
|
||||
reset: function(silent)
|
||||
{
|
||||
this.set(vimperator.modes.NORMAL, vimperator.modes.NONE);
|
||||
this.set(vimperator.modes.NORMAL, vimperator.modes.NONE, silent);
|
||||
},
|
||||
|
||||
show: function()
|
||||
|
||||
@@ -342,8 +342,7 @@ function CommandLine() //{{{
|
||||
{
|
||||
var mode = cur_extended_mode; // save it here, as setMode() resets it
|
||||
addToHistory(command);
|
||||
vimperator.modes.reset(); //FIXME: use mode stack
|
||||
//vimperator.modes.set(old_mode, old_extended_mode, true);
|
||||
vimperator.modes.reset(true); //FIXME: use mode stack
|
||||
//vimperator.focusContent();
|
||||
completionlist.hide();
|
||||
vimperator.statusline.updateProgress(""); // we may have a "match x of y" visible
|
||||
@@ -602,11 +601,13 @@ function CommandLine() //{{{
|
||||
return 2;
|
||||
}
|
||||
|
||||
function hide()
|
||||
function pass(event)
|
||||
{
|
||||
multiline_output_widget.collapsed = true;
|
||||
// FIXME: use mode stack
|
||||
vimperator.modes.reset();
|
||||
|
||||
vimperator.events.onKeyPress(event);
|
||||
}
|
||||
|
||||
var key = vimperator.events.toString(event);
|
||||
@@ -622,7 +623,7 @@ function CommandLine() //{{{
|
||||
if (canScroll() == 2)
|
||||
multiline_output_widget.contentWindow.scrollByLines(1);
|
||||
else
|
||||
hide();
|
||||
pass(event);
|
||||
break;
|
||||
case "k":
|
||||
case "<Up>":
|
||||
@@ -630,19 +631,19 @@ function CommandLine() //{{{
|
||||
if (canScroll() >= 1)
|
||||
multiline_output_widget.contentWindow.scrollByLines(-1);
|
||||
else
|
||||
hide();
|
||||
pass(event);
|
||||
break;
|
||||
case "f":
|
||||
if (canScroll() == 2)
|
||||
multiline_output_widget.contentWindow.scrollByPages(1);
|
||||
else
|
||||
hide();
|
||||
pass(event);
|
||||
break;
|
||||
case "b":
|
||||
if (canScroll() >= 1)
|
||||
multiline_output_widget.contentWindow.scrollByPages(-1);
|
||||
else
|
||||
hide();
|
||||
pass(event);
|
||||
break;
|
||||
case "g":
|
||||
multiline_output_widget.contentWindow.scrollTo(0, 0);
|
||||
@@ -653,9 +654,9 @@ function CommandLine() //{{{
|
||||
|
||||
default:
|
||||
if (canScroll() == 0 || vimperator.events.isCancelKey(key))
|
||||
hide();
|
||||
pass(event);
|
||||
else if (canScroll() == 1 && vimperator.events.isAcceptKey(key))
|
||||
hide();
|
||||
pass(event);
|
||||
else
|
||||
; // show a more help inline like in vim
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user