mirror of
https://github.com/gryf/pentadactyl-pm.git
synced 2025-12-21 15:57:58 +01:00
Messily tag NEWS page with more explicit version info.
--HG-- branch : key-processing
This commit is contained in:
@@ -305,14 +305,6 @@ var CommandMode = Class("CommandMode", {
|
||||
|
||||
if (this.complete)
|
||||
this.completions = CommandLine.Completions(commandline.widgets.active.command.inputField, this);
|
||||
|
||||
this.autocompleteTimer = Timer(200, 500, function autocompleteTell(tabPressed) {
|
||||
if (!events.feedingKeys && this.completions && options["autocomplete"].length) {
|
||||
this.completions.complete(true, false);
|
||||
if (this.completions)
|
||||
this.completions.itemList.visible = true;
|
||||
}
|
||||
}, this);
|
||||
},
|
||||
|
||||
open: function (command) {
|
||||
@@ -335,17 +327,14 @@ var CommandMode = Class("CommandMode", {
|
||||
commandline.commandSession = this;
|
||||
if (this.command || stack.pop && commandline.command) {
|
||||
this.onChange(commandline.command);
|
||||
this.autocompleteTimer.flush(true);
|
||||
if (this.completions)
|
||||
this.completions.autocompleteTimer.flush(true);
|
||||
}
|
||||
},
|
||||
|
||||
leave: function (stack) {
|
||||
this.autocompleteTimer.reset();
|
||||
|
||||
if (this.completions) {
|
||||
this.completions.previewClear();
|
||||
this.completions.tabTimer.reset();
|
||||
}
|
||||
if (this.completions)
|
||||
this.completions.cleanup();
|
||||
|
||||
if (this.history)
|
||||
this.history.save();
|
||||
@@ -368,9 +357,9 @@ var CommandMode = Class("CommandMode", {
|
||||
if (this.completions) {
|
||||
this.resetCompletions();
|
||||
|
||||
this.autocompleteTimer.tell(false);
|
||||
this.completions.autocompleteTimer.tell(false);
|
||||
if (!this.completions.itemList.visible)
|
||||
this.autocompleteTimer.flush();
|
||||
this.completions.autocompleteTimer.flush();
|
||||
}
|
||||
this.onChange(commandline.command);
|
||||
},
|
||||
@@ -614,8 +603,10 @@ var CommandLine = Module("commandline", {
|
||||
if (this.widgets.message && this.widgets.message[1] === this._lastClearable)
|
||||
this.widgets.message = null;
|
||||
|
||||
if (!this.commandSession)
|
||||
if (!this.commandSession) {
|
||||
this.widgets.command = null;
|
||||
this.hideCompletions();
|
||||
}
|
||||
|
||||
if (modes.main == modes.OUTPUT_MULTILINE && !mow.isScrollable(1))
|
||||
modes.pop();
|
||||
@@ -990,11 +981,24 @@ var CommandLine = Module("commandline", {
|
||||
this.itemList = commandline.completionList;
|
||||
this.itemList.setItems(this.context);
|
||||
|
||||
this.autocompleteTimer = Timer(200, 500, function autocompleteTell(tabPressed) {
|
||||
if (!events.feedingKeys && this.completions && options["autocomplete"].length) {
|
||||
this.complete(true, false);
|
||||
this.itemList.visible = true;
|
||||
}
|
||||
}, this);
|
||||
this.tabTimer = Timer(0, 0, function tabTell(event) {
|
||||
this.tab(event.shiftKey, event.altKey && options["altwildmode"]);
|
||||
}, this);
|
||||
},
|
||||
|
||||
cleanup: function () {
|
||||
this.previewClear();
|
||||
this.tabTimer.reset();
|
||||
this.autocompleteTimer.reset();
|
||||
this.itemList.visible = false;
|
||||
},
|
||||
|
||||
UP: {},
|
||||
DOWN: {},
|
||||
PAGE_UP: {},
|
||||
@@ -1207,7 +1211,7 @@ var CommandLine = Module("commandline", {
|
||||
tabs: [],
|
||||
|
||||
tab: function tab(reverse, wildmode) {
|
||||
this.session.autocompleteTimer.flush();
|
||||
this.autocompleteTimer.flush();
|
||||
|
||||
if (this._caret != this.caret)
|
||||
this.reset();
|
||||
|
||||
@@ -560,10 +560,15 @@ var Dactyl = Module("dactyl", XPCOM(Ci.nsISupportsWeakReference, ModuleBase), {
|
||||
* @private
|
||||
*/
|
||||
initDocument: function initDocument(doc) {
|
||||
try {
|
||||
if (doc.location.protocol === "dactyl:") {
|
||||
dactyl.initHelp();
|
||||
config.styleHelp();
|
||||
}
|
||||
}
|
||||
catch (e) {
|
||||
util.reportError(e);
|
||||
}
|
||||
},
|
||||
|
||||
/**
|
||||
@@ -662,9 +667,9 @@ var Dactyl = Module("dactyl", XPCOM(Ci.nsISupportsWeakReference, ModuleBase), {
|
||||
|
||||
let re = util.regexp(<![CDATA[
|
||||
^ (?P<space> \s*)
|
||||
(?P<char> [-*+]) \x20
|
||||
(?P<char> [-*+]) \ //
|
||||
(?P<content> .*\n
|
||||
(?: \1\x20\x20.*\n | \s*\n)* )
|
||||
(?: \1\ \ .*\n | \s*\n)* )
|
||||
|
|
||||
(?P<par>
|
||||
(?: ^ [^\S\n]*
|
||||
@@ -676,30 +681,55 @@ var Dactyl = Module("dactyl", XPCOM(Ci.nsISupportsWeakReference, ModuleBase), {
|
||||
(?: ^ [^\S\n]* \n) +
|
||||
]]>, "gmy");
|
||||
|
||||
let betas = util.regexp(/\[(b\d)\]/, "g");
|
||||
|
||||
let beta = array(betas.iterate(NEWS))
|
||||
.map(function (m) m[1]).uniq().slice(-1)[0];
|
||||
|
||||
default xml namespace = NS;
|
||||
function rec(text, level) {
|
||||
function rec(text, level, li) {
|
||||
let res = <></>;
|
||||
let list, space;
|
||||
let list, space, i = 0;
|
||||
|
||||
for (let match in re.iterate(text)) {
|
||||
if (match.char) {
|
||||
if (!list)
|
||||
res += list = <ul/>;
|
||||
list.* += <li>{rec(match.content.replace(RegExp("^" + match.space, "gm"), ""), level + 1)}</li>;
|
||||
let li = <li/>;
|
||||
li.* += rec(match.content.replace(RegExp("^" + match.space, "gm"), ""), level + 1, li)
|
||||
list.* += li;
|
||||
}
|
||||
else if (match.par) {
|
||||
let [, par, tags] = /([^]*?)\s*((?:\[[^\]]+\])*)\n*$/.exec(match.par);
|
||||
let t = tags;
|
||||
tags = array(betas.iterate(tags)).map(function (m) m[1]);
|
||||
|
||||
let group = tags.length && !tags.some(function (t) t == beta) ? "HelpNewsOld" : "";
|
||||
if (i === 0 && li) {
|
||||
li.@highlight = group;
|
||||
group = "";
|
||||
}
|
||||
|
||||
list = null;
|
||||
if (level == 0 && /^.*:\n$/.test(match.par))
|
||||
res += <h2>{template.linkifyHelp(match.par.slice(0, -1), true)}</h2>;
|
||||
if (level == 0 && /^.*:\n$/.test())
|
||||
var elem = <h2>{template.linkifyHelp(par.slice(0, -1), true)}</h2>;
|
||||
else {
|
||||
let [, a, b] = /^(IMPORTANT:?)?([^]*)/.exec(match.par);
|
||||
res += <p>{
|
||||
let [, a, b] = /^(IMPORTANT:?)?([^]*)/.exec(par);
|
||||
res += <p highlight={group + " HelpNews"}>{
|
||||
!tags.length ? "" :
|
||||
<hl key="HelpNewsTag">{tags.join(" ")}</hl>
|
||||
}{
|
||||
a ? <hl key="HelpWarning">{a}</hl> : ""
|
||||
}{
|
||||
template.linkifyHelp(b, true)
|
||||
}</p>;
|
||||
}
|
||||
}
|
||||
i++;
|
||||
}
|
||||
for each (let attr in res..@highlight) {
|
||||
attr.parent().@NS::highlight = attr;
|
||||
delete attr.parent().@highlight;
|
||||
}
|
||||
return res;
|
||||
}
|
||||
@@ -710,7 +740,7 @@ var Dactyl = Module("dactyl", XPCOM(Ci.nsISupportsWeakReference, ModuleBase), {
|
||||
'<?xml-stylesheet type="text/xsl" href="dactyl://content/help.xsl"?>\n' +
|
||||
'<!DOCTYPE document SYSTEM "resource://dactyl-content/dactyl.dtd">\n' +
|
||||
unescape(encodeURI( // UTF-8 handling hack.
|
||||
<document xmlns={NS}
|
||||
<document xmlns={NS} xmlns:dactyl={NS}
|
||||
name="versions" title={config.appName + " Versions"}>
|
||||
<h1 tag="versions news">{config.appName} Versions</h1>
|
||||
<toc start="2"/>
|
||||
|
||||
@@ -613,6 +613,9 @@ var ConfigBase = Class("ConfigBase", {
|
||||
HelpString[delim]::before content: attr(delim);
|
||||
HelpString[delim]::after content: attr(delim);
|
||||
|
||||
HelpNews position: relative;
|
||||
HelpNewsOld opacity: .7;
|
||||
HelpNewsTag position: absolute; left: 100%; padding-left: 1em; color: #527BBD; opacity: .6;
|
||||
|
||||
HelpHead;html|h1,html|h2,html|h3,html|h4;dactyl://help/* {
|
||||
font-weight: bold;
|
||||
|
||||
@@ -1270,8 +1270,7 @@ var Util = Module("Util", XPCOM([Ci.nsIObserver, Ci.nsISupportsWeakReference]),
|
||||
if (tokens)
|
||||
expr = String.replace(expr, /(\(?P)?<(\w+)>/g, function (m, n1, n2) !n1 && set.has(tokens, n2) ? tokens[n2].dactylSource || tokens[n2].source || tokens[n2] : m);
|
||||
|
||||
expr = String.replace(expr, /\/\/[^\n]*|\/\*[^]*?\*\//gm, "")
|
||||
.replace(/\s+/g, "");
|
||||
expr = String.replace(expr, /(\\.)|\/\/[^\n]*|\/\*[^]*?\*\/|\s+/gm, function (m, m1) m1 || "");
|
||||
|
||||
if (/\(\?P</.test(expr)) {
|
||||
var source = expr;
|
||||
|
||||
154
pentadactyl/NEWS
154
pentadactyl/NEWS
@@ -2,23 +2,24 @@
|
||||
* Extensive Firefox 4 support, including:
|
||||
- Fully restartless. Can now be installed, uninstalled,
|
||||
enabled, disabled, and upgraded without restarting Firefox.
|
||||
[b4]
|
||||
- Tabs in :buffer completions and listings are grouped
|
||||
by panorama groups.
|
||||
by panorama groups. [b1]
|
||||
- Only visible tabs are considered in tab numbering,
|
||||
gt/gn/gN, etc.
|
||||
* Improved startup time by a factor of 7.
|
||||
gt/gn/gN, etc. [b1]
|
||||
* Improved startup time by a factor of 7. [b1]
|
||||
* Significant completion speed improvements, especially for
|
||||
JavaScript.
|
||||
JavaScript. [b1]
|
||||
* Greatly improved private mode support and :sanitize command.
|
||||
- Full integration with Firefox data clearing dialogs.
|
||||
- Support for sanitizing items at shutdown.
|
||||
- Full integration with Firefox data clearing dialogs. [b3]
|
||||
- Support for sanitizing items at shutdown. [b3]
|
||||
- Fine-grained control over what data is sanitized and for
|
||||
what timespan.
|
||||
what timespan. [b1]
|
||||
- Support for sanitizing reference to particular hosts,
|
||||
everywhere from command-line and message history to option
|
||||
values and cookies.
|
||||
values and cookies. [b1]
|
||||
* New and much more powerful incremental search implementation.
|
||||
Improvements over the standard Firefox find include:
|
||||
Improvements over the standard Firefox find include: [b1]
|
||||
- Starts at the cursor position in the currently selected
|
||||
frame, unlike Firefox, which always starts at the start of
|
||||
the first frame.
|
||||
@@ -28,62 +29,70 @@
|
||||
backspace.
|
||||
- Supports reverse incremental search.
|
||||
- Input boxes are not focused when matches are highlighted.
|
||||
* It's now possible to map keys in many more modes, including
|
||||
Hint, Multi-line Output, and Menu.
|
||||
* Ex command parsing improvements, including:
|
||||
- Multiple Ex commands may now be separated by |
|
||||
- Multiple Ex commands may now be separated by | [b1]
|
||||
- Commands can continue over multiple lines in RC files by
|
||||
prefixing the continuation lines with a \
|
||||
prefixing the continuation lines with a \ [b3]
|
||||
- The \ character is no longer treated specially within single
|
||||
quotes, i.e., 'fo\o''bar' ⇒ fo\o'bar
|
||||
quotes, i.e., 'fo\o''bar' ⇒ fo\o'bar [b1]
|
||||
* Command line is now hidden by default. Added c, C, and M to
|
||||
'guioptions'.
|
||||
'guioptions'. [b4]
|
||||
* Hint mode improvements, including:
|
||||
- Added g; continued extended hint mode, which allows
|
||||
selecting multiple hints. Removed ;F.
|
||||
- Hints are now updated after scrolling and window resizing.
|
||||
selecting multiple hints. Removed ;F. [b1]
|
||||
- Hints are now updated after scrolling and window resizing. [b3]
|
||||
- ;s now prompts for a filename on the command-line rather
|
||||
than in a dialog.
|
||||
- Added ;a and ;S modes for creating bookmarks and search keywords.
|
||||
- Added 'hintkeys' option.
|
||||
- Added "transliterated" option to 'hintmatching'.
|
||||
* JavaScript completion improvements, including:
|
||||
than in a dialog. [b5]
|
||||
- Added ;a and ;S modes for creating bookmarks and search keywords. [b4][b3]
|
||||
- Added 'hintkeys' option. [b2]
|
||||
- Added "transliterated" option to 'hintmatching'. [b1]
|
||||
* JavaScript completion improvements, including: [b2]
|
||||
- The prototype of the function whose arguments are currently
|
||||
being typed is displayed during completion.
|
||||
- Non-enumerable global properties are now completed for the
|
||||
global object, including XMLHttpRequest and encodeURI.
|
||||
* The concept of completion contexts is now exposed to the user
|
||||
(see :h :contexts), allowing for powerful and fine-grained
|
||||
completion system customization.
|
||||
completion system customization. [b1]
|
||||
* The external editor can now be configured to open to a given
|
||||
line number and column, used for opening source links and
|
||||
editing input fields with i_<C-i>. See :h 'editor'.
|
||||
editing input fields with i_<C-i>. See :h 'editor'. [b4]
|
||||
* Mapping changes:
|
||||
- It's now possible to map keys in many more modes, including
|
||||
Hint, Multi-line Output, and Menu. [b4]
|
||||
- Added site-specific mapping groups and related command
|
||||
changes. [b6]
|
||||
- Added <A-m>l and <A-m>s to aid in the construction of
|
||||
macros. [b6]
|
||||
- Removed the implicit page load delays during macro playback. [b6]
|
||||
- Added the base modes Base, Main, and Command which other
|
||||
modes inherit key bindings from. [b6]
|
||||
* Command changes:
|
||||
- :viusage, :optionusage and :exusage were replaced with :listkeys,
|
||||
:listoptions and :listcommands, providing more powerful and
|
||||
consistent interactive help facility (improvements include
|
||||
listing keys for modes other than Normal, filtering the output
|
||||
and linking to source code locations).
|
||||
and linking to source code locations). [b4]
|
||||
- :downloads now opens a download list in the multi-line output
|
||||
buffer.
|
||||
- Added :mapgroup command and -group flag to :map, :unmap, and
|
||||
:mapclear.
|
||||
:mapclear. [b6]
|
||||
- :extensions has been replaced with a more powerful :addons.
|
||||
- Added :cookies command.
|
||||
- Added :cookies command. [b3]
|
||||
- :extadd now supports remote URLs as well as local files on Firefox 4.
|
||||
- Added :if/:elseif/:else/:endif conditionals.
|
||||
- Added :if/:elseif/:else/:endif conditionals. [b3]
|
||||
- Added -charset and -post to :bmark.
|
||||
- Added -keyword, -tags, -title to :delbmarks.
|
||||
- Added -keyword, -tags, -title to :delbmarks. [b2]
|
||||
- Added :extrehash, :exttoggle, :extupdate, and :rehash commands.
|
||||
- Added :feedkeys command.
|
||||
- Added -sort option to :history.
|
||||
- Added :feedkeys command. [b4]
|
||||
- Added -sort option to :history. [b4]
|
||||
- Added several new options, including -javascript, to :abbreviate and
|
||||
:map.
|
||||
- Added :mksyntax command to auto-generate Vim syntax files.
|
||||
:map. [b2]
|
||||
- Added :mksyntax command to auto-generate Vim syntax files. [b4]
|
||||
- :open now only opens files beginning with /, ./, ../, or ~/
|
||||
- :saveas now provides completions for default file names, and
|
||||
automatically chooses a filename when the save target is a
|
||||
directory.
|
||||
directory. [b4]
|
||||
- :sidebar now accepts a ! flag to toggle the sidebar rather
|
||||
than open it unconditionally.
|
||||
- Added :write !cmd and :write >>file.
|
||||
@@ -93,80 +102,73 @@
|
||||
- :command now accepts comma-separated alternative command names.
|
||||
- :command -complete custom now also accepts a completions array, see
|
||||
:h :command-completion-custom.
|
||||
* Mapping changes:
|
||||
- Added site-specific mapping groups and related command
|
||||
changes.
|
||||
- Added named aliases for many mappings
|
||||
- Added <A-m>l and <A-m>s to aid in the construction of macros.
|
||||
- Removed the implicit page load delays during macro playback.
|
||||
- Added the base modes Base, Main, and Command which other
|
||||
modes inherit key bindings from.
|
||||
* Improvements to :style and :highlight:
|
||||
- Added -agent flag to :style.
|
||||
- Added -link flag to :highlight. [b4]
|
||||
- Added -agent flag to :style. [b2]
|
||||
- The -append flag now updates existing properties rather than
|
||||
simply appending its arguments to the previous value.
|
||||
- Active filters are now highlighted in :style listings.
|
||||
simply appending its arguments to the previous value. [b4]
|
||||
- Active filters are now highlighted in :style listings. [b4]
|
||||
- :style-related commands now divide their completions between
|
||||
those active and inactive for the current site.
|
||||
- CSS property name completion is now available.
|
||||
those active and inactive for the current site. [b4]
|
||||
- CSS property name completion is now available. [b4]
|
||||
* IMPORTANT option changes:
|
||||
- Boolean options no longer accept an argument.
|
||||
- Boolean options no longer accept an argument. [b4]
|
||||
- 'cdpath' and 'runtimepath' no longer treat ",,"
|
||||
specially. Use "." instead.
|
||||
- 'incsearch', 'hlsearch', 'ignorecase', and 'smartcase' have
|
||||
been replaced with 'incfind', 'hlfind', and 'findcase'.
|
||||
been replaced with 'incfind', 'hlfind', and 'findcase'. [b4]
|
||||
- 'extendedhinttags' is now a regexpmap rather than a
|
||||
string.
|
||||
string. [b2]
|
||||
- 'guioptions' default value has changed.
|
||||
- 'laststatus' has been replaced with the "s" flag in
|
||||
'guioptions'.
|
||||
'guioptions'. [b4]
|
||||
- 'linksearch' has been removed. The \l search modifier can
|
||||
still be used for this purpose.
|
||||
still be used for this purpose. [b4]
|
||||
- 'loadplugins' is now a regexplist option rather than
|
||||
a boolean.
|
||||
a boolean. [b2]
|
||||
- 'mapleader' is now an option rather than a :let
|
||||
variable.
|
||||
- 'showstatuslinks' and 'showtabline' are now string options.
|
||||
- 'showstatuslinks' and 'showtabline' are now string options. [b4]
|
||||
* IMPORTANT: Command script files now use the *.penta file extension.
|
||||
* IMPORTANT: Plugins are now loaded from the 'plugins/'
|
||||
directory in 'runtimepath' rather than 'plugin/'.
|
||||
* IMPORTANT: Option value quoting has changed. List options will
|
||||
* Option changes:
|
||||
- IMPORTANT: Option value quoting has changed. List options will
|
||||
no longer be split at quoted commas and the option name,
|
||||
operators, and = sign may no longer be quoted. This will break
|
||||
certain automatically-generated configuration files.
|
||||
See :help stringlist.
|
||||
* Option changes:
|
||||
See :help stringlist. [b2]
|
||||
- Added "bookmarks", "diverted", and "links" to 'activate'
|
||||
option.
|
||||
- Added 'altwildmode' and c_<A-Tab> command-line key binding.
|
||||
- Added 'altwildmode' and c_<A-Tab> command-line key binding. [b2]
|
||||
- Added 'autocomplete' option for specifying which completion
|
||||
groups should be auto-completed.
|
||||
- Added 'banghist' option.
|
||||
- Replaced 'focuscontent' with 'strictfocus'.
|
||||
groups should be auto-completed. [b2]
|
||||
- Added 'banghist' option. [b1]
|
||||
- Replaced 'focuscontent' with 'strictfocus'. [b1]
|
||||
- 'complete' now defaults to "slf" but file completion only
|
||||
triggers when the URL begins as above.
|
||||
- Added 'passkeys' option.
|
||||
- Changed 'urlseparator' default value to "|".
|
||||
- Added "passwords" and "venkman" dialogs to :dialog.
|
||||
- Added 'wildanchor' option.
|
||||
- Added 'cookies', 'cookieaccept', and 'cookielifetime' options.
|
||||
* Added BookmarkChange, BookmarkRemove autocommands.
|
||||
- Added "passwords" and "venkman" dialogs to :dialog. [b2]
|
||||
- Added 'wildanchor' option. [b2]
|
||||
- Added 'cookies', 'cookieaccept', and 'cookielifetime' options. [b3]
|
||||
* Added BookmarkChange, BookmarkRemove autocommands. [b2]
|
||||
* Removed the :source line at the end of files generated by
|
||||
:mkpentadactylrc.
|
||||
:mkpentadactylrc. [b2]
|
||||
* gf now toggles between source and content view.
|
||||
The | key binding has been removed.
|
||||
The | key binding has been removed. [b1]
|
||||
* Page zoom information is now shown in the status bar, and
|
||||
change in zoom status no longer appears in :messages.
|
||||
* Added ZO, ZI, ZM, and ZR as aliases for zO, zI, zM, and zR.
|
||||
change in zoom status no longer appears in :messages. [b1]
|
||||
* Added ZO, ZI, ZM, and ZR as aliases for zO, zI, zM, and zR. [b1]
|
||||
* Completion list now behaves better when the multi-line output
|
||||
window is displayed.
|
||||
window is displayed. [b1]
|
||||
* Major help system improvements:
|
||||
- Plugins may now provide full-fledged :help documentation.
|
||||
- Add basic plugin authorship documentation.
|
||||
- Add basic plugin authorship documentation. [b1]
|
||||
- The help system is newly modularized and features significant
|
||||
updates, rewrites, and formatting improvements.
|
||||
- Added <A-F1> to open the single unchunked help page.
|
||||
* Removed :beep.
|
||||
* Removed :edit, :tabedit, and :winedit aliases.
|
||||
* Removed :play.
|
||||
updates, rewrites, and formatting improvements. [b1]
|
||||
- Added <A-F1> to open the single unchunked help page. [b5]
|
||||
* Removed :beep. [b2]
|
||||
* Removed :edit, :tabedit, and :winedit aliases. [b2]
|
||||
* Removed :play. [b2]
|
||||
|
||||
|
||||
Reference in New Issue
Block a user