1
0
mirror of https://github.com/gryf/pentadactyl-pm.git synced 2025-12-28 19:02:29 +01:00

merge new :redraw command and changed 'linksearch' pattern modifiers

This commit is contained in:
Doug Kearns
2007-10-09 06:38:42 +00:00
parent 0a71af0d0a
commit bb41e28510
5 changed files with 36 additions and 5 deletions

View File

@@ -1051,6 +1051,18 @@ function Commands() //{{{
help: "Quit Vimperator, no matter how many tabs/windows are open. The session is not stored."
}
));
addDefaultCommand(new Command(["redr[aw]"],
function()
{
var wu = window.QueryInterface(Components.interfaces.nsIInterfaceRequestor).
getInterface(Components.interfaces.nsIDOMWindowUtils);
wu.redraw();
},
{
short_help: "Redraw the screen",
help: "Useful to update the screen halfway executing a script or function."
}
));
addDefaultCommand(new Command(["re[load]"],
function(args, special) { vimperator.tabs.reload(getBrowser().mCurrentTab, special); },
{

View File

@@ -70,10 +70,10 @@ function Search() //{{{
search_pattern = pattern;
// links only search - \u wins if both modifiers specified
if (/\\u/.test(pattern))
// links only search - \l wins if both modifiers specified
if (/\\l/.test(pattern))
links_only = false;
else if (/\U/.test(pattern))
else if (/\L/.test(pattern))
links_only = true;
else if (vimperator.options["linksearch"])
links_only = true;

View File

@@ -579,6 +579,14 @@ function Mappings() //{{{
"Whether the new buffer is activated, depends on the <code class=\"option\">'activate'</code> option."
}
));
addDefaultMap(new Map([vimperator.modes.NORMAL], ["<C-l>"],
function(count) { vimperator.commands.redraw(); },
{
short_help: "Redraw the screen",
help: "Works like <code class=\"command\">:redraw</code>.",
flags: Mappings.flags.COUNT
}
));
addDefaultMap(new Map(vimperator.modes.NORMAL, ["r"],
function() { vimperator.tabs.reload(getBrowser().mCurrentTab, false); },
{