1
0
mirror of https://github.com/gryf/pentadactyl-pm.git synced 2025-12-21 17:47:59 +01:00

Merge branch 'master' into xulmus

This commit is contained in:
Doug Kearns
2009-03-28 17:20:51 +11:00
18 changed files with 90 additions and 48 deletions

View File

@@ -1022,7 +1022,16 @@ function Buffer() //{{{
} }
else if (elemTagName == "input" && elem.getAttribute('type').toLowerCase() == "file") else if (elemTagName == "input" && elem.getAttribute('type').toLowerCase() == "file")
{ {
commandline.input("Upload file: ", function (file) elem.value = file, {completer: completion.file, default: elem.value}); commandline.input("Upload file: ", function (path)
{
let file = io.getFile(path);
if (!file.exists())
return liberator.beep();
elem.value = file.path;
}
, {completer: completion.file, default: elem.value});
return; return;
} }
@@ -1132,7 +1141,16 @@ function Buffer() //{{{
} }
else if (localName == "input" && elem.getAttribute('type').toLowerCase() == "file") else if (localName == "input" && elem.getAttribute('type').toLowerCase() == "file")
{ {
commandline.input("Upload file: ", function (file) elem.value = file, {completer: completion.file, default: elem.value}); commandline.input("Upload file: ", function (path)
{
let file = io.getFile(path);
if (!file.exists())
return liberator.beep();
elem.value = file.path;
}
, {completer: completion.file, default: elem.value});
return; return;
} }

View File

@@ -898,6 +898,7 @@ function Events() //{{{
let wasFeeding = this.feedingKeys; let wasFeeding = this.feedingKeys;
this.feedingKeys = true; this.feedingKeys = true;
this.duringFeed = this.duringFeed || "";
let wasSilent = commandline.silent; let wasSilent = commandline.silent;
if (silent) if (silent)
commandline.silent = silent; commandline.silent = silent;
@@ -993,6 +994,15 @@ function Events() //{{{
this.feedingKeys = wasFeeding; this.feedingKeys = wasFeeding;
if (silent) if (silent)
commandline.silent = wasSilent; commandline.silent = wasSilent;
if (this.duringFeed != "")
{
//Create a scalar constant for closure.
let duringFeed = this.duringFeed;
this.duringFeed = "";
setTimeout(function () events.feedkeys(duringFeed, false, false, true), 0);
}
} }
return i == keys.length; return i == keys.length;
}, },
@@ -1385,9 +1395,9 @@ function Events() //{{{
// we can differentiate between a recorded <C-c> // we can differentiate between a recorded <C-c>
// interrupting whatever it's started and a real <C-c> // interrupting whatever it's started and a real <C-c>
// interrupting our playback. // interrupting our playback.
if (events.feedingKeys) if (events.feedingKeys && !event.isMacro)
{ {
if (key == "<C-c>" && !event.isMacro) if (key == "<C-c>")
{ {
events.feedingKeys = false; events.feedingKeys = false;
if (modes.isReplaying) if (modes.isReplaying)
@@ -1399,6 +1409,13 @@ function Events() //{{{
event.stopPropagation(); event.stopPropagation();
return true; return true;
} }
else
{
events.duringFeed += key;
event.preventDefault();
event.stopPropagation();
return true;
}
} }
let stop = true; // set to false if we should NOT consume this event but let Firefox handle it let stop = true; // set to false if we should NOT consume this event but let Firefox handle it
@@ -1681,13 +1698,16 @@ function Events() //{{{
} }
}, },
// for notifying the user about secure web pages // for notifying the user about secure web pages
onSecurityChange: function (webProgress, aRequest, aState) onSecurityChange: function (webProgress, request, state)
{ {
if (aState & Ci.nsIWebProgressListener.STATE_IS_INSECURE) // TODO: do something useful with STATE_SECURE_MED and STATE_SECURE_LOW
if (state & Ci.nsIWebProgressListener.STATE_IS_INSECURE)
statusline.setClass("insecure"); statusline.setClass("insecure");
else if (aState & Ci.nsIWebProgressListener.STATE_IS_BROKEN) else if (state & Ci.nsIWebProgressListener.STATE_IS_BROKEN)
statusline.setClass("broken"); statusline.setClass("broken");
else if (aState & Ci.nsIWebProgressListener.STATE_IS_SECURE) else if (state & Ci.nsIWebProgressListener.STATE_IDENTITY_EV_TOPLEVEL)
statusline.setClass("extended");
else if (state & Ci.nsIWebProgressListener.STATE_SECURE_HIGH)
statusline.setClass("secure"); statusline.setClass("secure");
}, },
onStatusChange: function (webProgress, request, status, message) onStatusChange: function (webProgress, request, status, message)

View File

@@ -72,8 +72,9 @@ Highlights.prototype.CSS = <![CDATA[
Question color: green; background: white; font-weight: bold; Question color: green; background: white; font-weight: bold;
StatusLine color: white; background: black; StatusLine color: white; background: black;
StatusLineBroken color: black; background: #FF6060 /* light-red */ StatusLineBroken color: black; background: #FFa0a0 /* light-red */
StatusLineSecure color: black; background: #B0FF00 /* light-green */ StatusLineSecure color: black; background: #a0a0FF /* light-blue */
StatusLineExtended color: black; background: #a0FFa0 /* light-green */
TabClose TabClose
TabIcon TabIcon

View File

@@ -2018,16 +2018,18 @@ function StatusLine() //{{{
/** /**
* Update the status bar to indicate how secure the website is: * Update the status bar to indicate how secure the website is:
* extended - Secure connection with Extended Validation(EV) certificate.
* secure - Secure connection with valid certificate. * secure - Secure connection with valid certificate.
* broken - Secure connection with invalid certificate, or * broken - Secure connection with invalid certificate, or
* mixed content. * mixed content.
* insecure - Insecure connection. * insecure - Insecure connection.
* *
* @param {'secure'|'broken'|'insecure'} type * @param {'extended'|'secure'|'broken'|'insecure'} type
*/ */
setClass: function setClass(type) setClass: function setClass(type)
{ {
const highlightGroup = { const highlightGroup = {
extended: "StatusLineExtended",
secure: "StatusLineSecure", secure: "StatusLineSecure",
broken: "StatusLineBroken", broken: "StatusLineBroken",
insecure: "StatusLine" insecure: "StatusLine"

View File

@@ -675,7 +675,7 @@ const util = { //{{{
// Ok, not a valid proto. If it looks like URL-ish (foo.com/bar), // Ok, not a valid proto. If it looks like URL-ish (foo.com/bar),
// let Gecko figure it out. // let Gecko figure it out.
if (/[.]/.test(url) && !/\s/.test(url) || /^[\w-.]+:\d+(?:\/|$)/.test(url)) if (/[.\/]/.test(url) && !/\s/.test(url) || /^[\w-.]+:\d+(?:\/|$)/.test(url))
return url; return url;
// TODO: it would be clearer if the appropriate call to // TODO: it would be clearer if the appropriate call to

View File

@@ -19,7 +19,7 @@ Inactive/former developers:
Patches (in no special order): Patches (in no special order):
* Ruud Grosmann ('followhints' option) * Ruud Grosmann ('followhints' option)
* Xie&Tian (multibyte support for hints) * Xie&Tian (multibyte support for hints, doc fixes)
* Juergen Descher * Juergen Descher
* Kazuo (count support for ctrl-^) * Kazuo (count support for ctrl-^)
* Daniel Schaffrath (;b support) * Daniel Schaffrath (;b support)

View File

@@ -51,7 +51,7 @@ Each token is analyzed and in this order:
to set a custom name, you can change it with [c]:dialog searchengines[c]. to set a custom name, you can change it with [c]:dialog searchengines[c].
3. Opened with the default search engine or keyword (specified with the 3. Opened with the default search engine or keyword (specified with the
'defsearch' option) if the first word is no search engine ([c]:open linus 'defsearch' option) if the first word is no search engine ([c]:open linus
torvalds[c] opens a Google search for linux torvalds). torvalds[c] opens a Google search for linus torvalds).
4. Passed directly to Firefox in all other cases ([c]:open www.osnews.com, 4. Passed directly to Firefox in all other cases ([c]:open www.osnews.com,
www.slashdot.org[c] opens OSNews in the current, and Slashdot in a new www.slashdot.org[c] opens OSNews in the current, and Slashdot in a new
background tab). background tab).

View File

@@ -123,6 +123,16 @@ set).
________________________________________________________________________________ ________________________________________________________________________________
|<Right>| |l| +
||[count]l||
________________________________________________________________________________
Scroll document to the right. If [count] is specified then move [count] times
as much to the right. +
If the document cannot scroll more, a beep is emitted (unless 'visualbell' is
set).
________________________________________________________________________________
|<C-d>| + |<C-d>| +
||[count]<C-d>|| ||[count]<C-d>||
________________________________________________________________________________ ________________________________________________________________________________
@@ -141,16 +151,6 @@ first set to this value.
________________________________________________________________________________ ________________________________________________________________________________
|<Right>| |l| +
||[count]l||
________________________________________________________________________________
Scroll document to the right. If [count] is specified then move [count] times
as much to the right. +
If the document cannot scroll more, a beep is emitted (unless 'visualbell' is
set).
________________________________________________________________________________
|<S-Space>| |<PageUp>| |<C-b>| + |<S-Space>| |<PageUp>| |<C-b>| +
||[count]<C-b>|| ||[count]<C-b>||
________________________________________________________________________________ ________________________________________________________________________________
@@ -235,7 +235,7 @@ default zoom levels are 30%, 50%, 67%, 80%, 90%, 100%, 110%, 120%, 133%, 150%,
The available zoom range can be changed by setting the The available zoom range can be changed by setting the
\'http://kb.mozillazine.org/Zoom.minPercent[zoom.minPercent]' and \'http://kb.mozillazine.org/Zoom.minPercent[zoom.minPercent]' and
\'http://kb.mozillazine.org/Zoom.minPercent[zoom.maxPercent]' Firefox \'http://kb.mozillazine.org/Zoom.maxPercent[zoom.maxPercent]' Firefox
preferences. The zoom levels can be changed using the preferences. The zoom levels can be changed using the
\'http://kb.mozillazine.org/Toolkit.zoomManager.zoomValues[toolkit.ZoomManager.zoomLevels]' \'http://kb.mozillazine.org/Toolkit.zoomManager.zoomValues[toolkit.ZoomManager.zoomLevels]'
preference. preference.
@@ -274,7 +274,7 @@ ________________________________________________________________________________
|zz| + |zz| +
||[count]zz|| ||[count]zz||
________________________________________________________________________________ ________________________________________________________________________________
Set text zoom value of current web page. Zoom value can be between 30 and 300%. Set text zoom value of current web page. Zoom value can be between 30% and 300%.
If it is omitted, text zoom is reset to 100%. If it is omitted, text zoom is reset to 100%.
________________________________________________________________________________ ________________________________________________________________________________
@@ -320,7 +320,7 @@ ________________________________________________________________________________
||:zo[om][!] +{value} | -{value}|| + ||:zo[om][!] +{value} | -{value}|| +
________________________________________________________________________________ ________________________________________________________________________________
Set zoom value of current web page. [a][value][a] can be an absolute value Set zoom value of current web page. [a][value][a] can be an absolute value
between 30 and 300% or a relative value if prefixed with "-" or "+". If between 30% and 300% or a relative value if prefixed with "-" or "+". If
[a][value][a] is omitted, zoom is reset to 100%. [a][value][a] is omitted, zoom is reset to 100%.
Normally this command operates on the text zoom, if used with [!] it operates Normally this command operates on the text zoom, if used with [!] it operates

View File

@@ -20,7 +20,7 @@ ________________________________________________________________________________
|:addo| |:addons| + |:addo| |:addons| +
||:addo[ns]|| ||:addo[ns]||
________________________________________________________________________________ ________________________________________________________________________________
Show available Browser Extensions and Themes. Show available browser Extensions and Themes.
You can add/remove/disable browser extensions from this dialog. You can add/remove/disable browser extensions from this dialog.
Be aware that not all Firefox extensions work, because Vimperator overrides Be aware that not all Firefox extensions work, because Vimperator overrides
some key bindings and changes Firefox's GUI. some key bindings and changes Firefox's GUI.
@@ -34,7 +34,7 @@ Open a Firefox dialog.
Available dialogs: Available dialogs:
`------------------`----------------------------------- `------------------`-----------------------------------
*about* About Firefox *about* About Mozilla Firefox
*addbookmark* Add bookmark for the current page *addbookmark* Add bookmark for the current page
*addons* Manage Add-ons *addons* Manage Add-ons
*bookmarks* List your bookmarks *bookmarks* List your bookmarks

View File

@@ -170,7 +170,7 @@ section:Ex{nbsp}commands[ex-cmd-index,:index]
||[c]:delmarks[c]|| Delete the specified marks + ||[c]:delmarks[c]|| Delete the specified marks +
||[c]:delqmarks[c]|| Delete the specified QuickMarks + ||[c]:delqmarks[c]|| Delete the specified QuickMarks +
||[c]:delstyle[c]|| Delete any matching styles + ||[c]:delstyle[c]|| Delete any matching styles +
||[c]:dialog[c]|| Open a undefined dialog + ||[c]:dialog[c]|| Open a Firefox dialog +
||[c]:doautoall[c]|| Apply the autocommands matching the specified URL to all buffers + ||[c]:doautoall[c]|| Apply the autocommands matching the specified URL to all buffers +
||[c]:doautocmd[c]|| Apply the autocommands matching the specified URL to the current buffer + ||[c]:doautocmd[c]|| Apply the autocommands matching the specified URL to the current buffer +
||[c]:downloads[c]|| Show progress of current downloads + ||[c]:downloads[c]|| Show progress of current downloads +
@@ -217,11 +217,11 @@ section:Ex{nbsp}commands[ex-cmd-index,:index]
||[c]:qmark[c]|| Mark a URL with a letter for quick access + ||[c]:qmark[c]|| Mark a URL with a letter for quick access +
||[c]:qmarks[c]|| Show all QuickMarks + ||[c]:qmarks[c]|| Show all QuickMarks +
||[c]:quit[c]|| Quit current tab + ||[c]:quit[c]|| Quit current tab +
||[c]:quitall[c]|| Quit undefined + ||[c]:quitall[c]|| Quit Vimperator +
||[c]:redraw[c]|| Redraw the screen + ||[c]:redraw[c]|| Redraw the screen +
||[c]:reload[c]|| Reload current page + ||[c]:reload[c]|| Reload current page +
||[c]:reloadall[c]|| Reload all tab pages + ||[c]:reloadall[c]|| Reload all tab pages +
||[c]:restart[c]|| Force undefined to restart + ||[c]:restart[c]|| Force the browser to restart +
||[c]:runtime[c]|| Source the specified file from each directory in 'runtimepath' + ||[c]:runtime[c]|| Source the specified file from each directory in 'runtimepath' +
||[c]:saveas[c]|| Save current document to disk + ||[c]:saveas[c]|| Save current document to disk +
||[c]:sbclose[c]|| Close the sidebar window + ||[c]:sbclose[c]|| Close the sidebar window +
@@ -261,7 +261,7 @@ section:Options[option-index]
||'activate'|| Define when tabs are automatically activated + ||'activate'|| Define when tabs are automatically activated +
||'cdpath'|| List of directories searched when executing [c]:cd[c] + ||'cdpath'|| List of directories searched when executing [c]:cd[c] +
||'complete'|| Items which are completed at the [c]:[tab]open prompt[c] + ||'complete'|| Items which are completed at the [c]:[tab]open[c] prompt +
||'defsearch'|| Set the default search engine + ||'defsearch'|| Set the default search engine +
||'editor'|| Set the external text editor + ||'editor'|| Set the external text editor +
||'errorbells'|| Ring the bell when an error message is displayed + ||'errorbells'|| Ring the bell when an error message is displayed +

View File

@@ -346,7 +346,7 @@ Custom completion
Custom completion can be provided by specifying the "custom,{func}" argument to Custom completion can be provided by specifying the "custom,{func}" argument to
-complete. The {func} is called with two arguments, a completion context, and -complete. The {func} is called with two arguments, a completion context, and
an object describing the command's arguments. It should set the context's an object describing the command's arguments. It should set the context's
\'completions' property, or return an object, with \'start' and \'items' \'completions' property, or return an object, with \'items' and \'start'
properties, describing the completions and where the replacement is to start. properties, describing the completions and where the replacement is to start.
*start* is the index into the word being completed at which the returned values *start* is the index into the word being completed at which the returned values

View File

@@ -80,7 +80,7 @@ section:History[history]
||[count]<C-o>|| ||[count]<C-o>||
________________________________________________________________________________ ________________________________________________________________________________
Go to an older position in the jump list. The jump list is just the browser Go to an older position in the jump list. The jump list is just the browser
history for now. history for now. If [count] is specified go back [count] pages.
________________________________________________________________________________ ________________________________________________________________________________
@@ -88,7 +88,7 @@ ________________________________________________________________________________
||[count]<C-i>|| ||[count]<C-i>||
________________________________________________________________________________ ________________________________________________________________________________
Go to a newer position in the jump list. The jump list is just the browser Go to a newer position in the jump list. The jump list is just the browser
history for now. history for now. If [count] is specified go forward [count] pages.
________________________________________________________________________________ ________________________________________________________________________________

View File

@@ -252,7 +252,7 @@ Sets the default search engine. The default search engine name is used in the
[c]:[tab]open [arg][c] command if [a][arg][a] neither looks like a URL or like [c]:[tab]open [arg][c] command if [a][arg][a] neither looks like a URL or like
a specified search engine/keyword. a specified search engine/keyword.
This means, it you set 'defsearch' to "youtube", then [c]:open arnold This means, if you set 'defsearch' to "youtube", then [c]:open arnold
schwarzenegger[c] will be exactly the same as [c]:open youtube arnold schwarzenegger[c] will be exactly the same as [c]:open youtube arnold
schwarzenegger[c]. Therefore, you need to add a keyword or search engine schwarzenegger[c]. Therefore, you need to add a keyword or search engine
"youtube" first. "youtube" first.
@@ -472,7 +472,7 @@ ____
|\'nolpl'| |\'lpl'| |\'noloadplugins'| |\'loadplugins'| |\'nolpl'| |\'lpl'| |\'noloadplugins'| |\'loadplugins'|
||'loadplugins' 'lpl'|| boolean (default on) ||'loadplugins' 'lpl'|| boolean (default: on)
____ ____
Load plugin scripts when starting up. When on, yet unloaded plugins are Load plugin scripts when starting up. When on, yet unloaded plugins are
automatically loaded after the vimperatorrc file has been sourced. To automatically loaded after the vimperatorrc file has been sourced. To
@@ -527,7 +527,7 @@ ____
|\'noonline'| |\'online'| |\'noonline'| |\'online'|
||'online'|| boolean (default on) ||'online'|| boolean (default: on)
____ ____
Show and set the \'work offline' behavior. Show and set the \'work offline' behavior.
____ ____
@@ -571,7 +571,7 @@ ____
|\'nopreload'| |\'preload'| |\'nopreload'| |\'preload'|
||'preload' 'nopreload'|| boolean (default: on) ||'preload' 'nopreload'|| boolean (default: on)
____ ____
Speed up first time history/bookmark completion Speed up first time history/bookmark completion.
History access can be quite slow for a large history. History access can be quite slow for a large history.
Vimperator maintains a cache to speed it up significantly on subsequent access. Vimperator maintains a cache to speed it up significantly on subsequent access.
@@ -751,7 +751,7 @@ ____
|\'wildcase'| |\'wic'| |\'wildcase'| |\'wic'|
||'wildcase' 'wic'|| string (default: "smart") ||'wildcase' 'wic'|| string (default: "smart")
____ ____
Defines how completions are matched with regard to character case. Defines how completions are matched with regard to character case. Possible values:
`---------------`------------------------ `---------------`------------------------
"smart" Case is significant when capital letters are typed "smart" Case is significant when capital letters are typed

View File

@@ -132,7 +132,7 @@ section:Profiling[profile,profiling]
|:time| |:time|
||:[count]time[!] {code|:command}|| + ||:[count]time[!] {code|:command}|| +
________________________________________________________________________________ ________________________________________________________________________________
Profile a piece of code or a command. Run {code} [count] times (default 1) Profile a piece of code or a command. Run {code} [count] times (default: 1)
and returns the elapsed time. {code} is always passed to JavaScript's eval(), and returns the elapsed time. {code} is always passed to JavaScript's eval(),
which might be slow, so take the results with a grain of salt. which might be slow, so take the results with a grain of salt.

View File

@@ -73,6 +73,7 @@ Valid groups are:
*StatusLine* The status bar *StatusLine* The status bar
*StatusLineBroken* The status bar for a broken web page *StatusLineBroken* The status bar for a broken web page
*StatusLineSecure* The status bar for a secure web page *StatusLineSecure* The status bar for a secure web page
*StatusLineExtended* The status bar for a secure web page with an Extended Validation(EV) certificate
*String* A JavaScript String object *String* A JavaScript String object
*TabClose* The close button of a browser tab *TabClose* The close button of a browser tab
*TabIcon* The icon of a browser tab *TabIcon* The icon of a browser tab

View File

@@ -57,7 +57,7 @@ Similarly, help on configurable options is available with [c]:help
'{option_name}'[c]. (Note the single quotes around the option name as in Vim.) '{option_name}'[c]. (Note the single quotes around the option name as in Vim.)
Information on all available options is, predictably, [c]:help options[c]. Information on all available options is, predictably, [c]:help options[c].
and you can find out about the [m]gt[m] and [m]gT[m] mapping with And you can find out about the [m]gt[m] and [m]gT[m] mapping with
\{nbsp}[c]:help gt<CR>[c] + \{nbsp}[c]:help gt<CR>[c] +
\{nbsp}[c]:help gT<CR>[c] \{nbsp}[c]:help gT<CR>[c]

View File

@@ -11,9 +11,9 @@ ________________________________________________________________________________
|<C-l>| |CTRL-L| |:redr| |:redraw| + |<C-l>| |CTRL-L| |:redr| |:redraw| +
||:redr[aw]|| ||:redr[aw]||
____ ________________________________________________________________________________
Redraws the screen. Useful to update the screen halfway executing a script or function. Redraws the screen. Useful to update the screen halfway executing a script or function.
____ ________________________________________________________________________________
|:norm| |:normal| |:norm| |:normal|
||:norm[al][!] {commands}|| + ||:norm[al][!] {commands}|| +
@@ -54,7 +54,7 @@ ________________________________________________________________________________
Open help window. The default page, as specified by 'helpfile' is shown unless Open help window. The default page, as specified by 'helpfile' is shown unless
[a][subject][a] is specified. If you need help for a specific topic, try [a][subject][a] is specified. If you need help for a specific topic, try
[c]:help overview[c]. [c]:help overview[c].
____________________________________________________________________________ ________________________________________________________________________________
|:exu| |:exusage| + |:exu| |:exusage| +