mirror of
https://github.com/gryf/pentadactyl-pm.git
synced 2025-12-20 13:37:58 +01:00
Merge branch 'master' into xulmus
This commit is contained in:
@@ -1032,6 +1032,11 @@ function Buffer() //{{{
|
|||||||
elem.contentWindow.focus();
|
elem.contentWindow.focus();
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
else if (elemTagName == "input" && elem.getAttribute('type').toLowerCase() == "file")
|
||||||
|
{
|
||||||
|
commandline.input("Upload file: ", function (file) elem.value = file, {completer: completion.file, default: elem.value});
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
elem.focus();
|
elem.focus();
|
||||||
|
|
||||||
@@ -1137,6 +1142,11 @@ function Buffer() //{{{
|
|||||||
offsetX = Number(coords[0]) + 1;
|
offsetX = Number(coords[0]) + 1;
|
||||||
offsetY = Number(coords[1]) + 1;
|
offsetY = Number(coords[1]) + 1;
|
||||||
}
|
}
|
||||||
|
else if (localName == "input" && elem.getAttribute('type').toLowerCase() == "file")
|
||||||
|
{
|
||||||
|
commandline.input("Upload file: ", function (file) elem.value = file, {completer: completion.file, default: elem.value});
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
let ctrlKey = false, shiftKey = false;
|
let ctrlKey = false, shiftKey = false;
|
||||||
switch (where)
|
switch (where)
|
||||||
|
|||||||
@@ -1445,15 +1445,17 @@ function Completion() //{{{
|
|||||||
|
|
||||||
colorScheme: function colorScheme(context)
|
colorScheme: function colorScheme(context)
|
||||||
{
|
{
|
||||||
// TODO: use path for the description?
|
let colors = [];
|
||||||
|
|
||||||
io.getRuntimeDirectories("colors").forEach(function (dir) {
|
io.getRuntimeDirectories("colors").forEach(function (dir) {
|
||||||
context.fork(dir.path, 0, null, function (context) {
|
io.readDirectory(dir).forEach(function (file) {
|
||||||
context.filter = dir.path + io.pathSeparator + context.filter;
|
if (/\.vimp$/.test(file.leafName) && !colors.some(function (c) c.leafName == file.leafName))
|
||||||
completion.file(context);
|
colors.push(file);
|
||||||
context.title = ["Color Scheme"];
|
|
||||||
context.quote = ["", function (text) text.replace(/\.vimp$/, ""), ""];
|
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
|
context.title = ["Color Scheme", "Runtime Path"];
|
||||||
|
context.completions = [[c.leafName.replace(/\.vimp$/, ""), c.parent.path] for ([,c] in Iterator(colors))]
|
||||||
},
|
},
|
||||||
|
|
||||||
command: function command(context)
|
command: function command(context)
|
||||||
|
|||||||
@@ -1201,6 +1201,8 @@ function CommandLine() //{{{
|
|||||||
* for the user's input.
|
* for the user's input.
|
||||||
* @... {string} promptHighlight - The HighlightGroup used for the
|
* @... {string} promptHighlight - The HighlightGroup used for the
|
||||||
* prompt. @default "Question"
|
* prompt. @default "Question"
|
||||||
|
* @... {string} default - The initial value that will be returned
|
||||||
|
* if the user presses <CR> straightaway. @default ""
|
||||||
*/
|
*/
|
||||||
input: function _input(prompt, callback, extra)
|
input: function _input(prompt, callback, extra)
|
||||||
{
|
{
|
||||||
@@ -1296,8 +1298,15 @@ function CommandLine() //{{{
|
|||||||
// user pressed ENTER to carry out a command
|
// user pressed ENTER to carry out a command
|
||||||
// user pressing ESCAPE is handled in the global onEscape
|
// user pressing ESCAPE is handled in the global onEscape
|
||||||
// FIXME: <Esc> should trigger "cancel" event
|
// FIXME: <Esc> should trigger "cancel" event
|
||||||
|
// FIXME: This should not be waiting, some kind of callback mechanism on completion would be better.
|
||||||
if (events.isAcceptKey(key))
|
if (events.isAcceptKey(key))
|
||||||
{
|
{
|
||||||
|
while (completions.context.incomplete)
|
||||||
|
{
|
||||||
|
liberator.threadYield(true);
|
||||||
|
command = this.command;
|
||||||
|
}
|
||||||
|
|
||||||
let mode = currentExtendedMode; // save it here, as modes.pop() resets it
|
let mode = currentExtendedMode; // save it here, as modes.pop() resets it
|
||||||
keepCommand = true;
|
keepCommand = true;
|
||||||
currentExtendedMode = null; // Don't let modes.pop trigger "cancel"
|
currentExtendedMode = null; // Don't let modes.pop trigger "cancel"
|
||||||
|
|||||||
@@ -21,6 +21,8 @@
|
|||||||
* IMPORTANT: 'verbose' is now by default at 1, set to 0 to not show any status messages.
|
* IMPORTANT: 'verbose' is now by default at 1, set to 0 to not show any status messages.
|
||||||
* IMPORTANT: $VIMPERATOR_HOME is no longer used.
|
* IMPORTANT: $VIMPERATOR_HOME is no longer used.
|
||||||
|
|
||||||
|
* Selecting an <input type="file"> with hints now causes the commandline to prompt
|
||||||
|
for file input (instead of doing nothing).
|
||||||
* [count]<C-n> now goes to the [count]th next tab rather than the [count]th tab.
|
* [count]<C-n> now goes to the [count]th next tab rather than the [count]th tab.
|
||||||
* add ~/.vimperator/info/{profile}/, similar to viminfo
|
* add ~/.vimperator/info/{profile}/, similar to viminfo
|
||||||
* add $VIMPERATOR_RUNTIME, $VIMPERATOR_INIT
|
* add $VIMPERATOR_RUNTIME, $VIMPERATOR_INIT
|
||||||
|
|||||||
@@ -39,6 +39,8 @@ BUGS:
|
|||||||
- URLs in :ls output are no longer hyperlinks
|
- URLs in :ls output are no longer hyperlinks
|
||||||
|
|
||||||
FEATURES:
|
FEATURES:
|
||||||
|
9 change the extension ID to vimperator@vimperator.org rather than
|
||||||
|
vimperator@mozdev.org
|
||||||
9 finish :help TODOs
|
9 finish :help TODOs
|
||||||
9 fix local options
|
9 fix local options
|
||||||
9 adaptive timeout for auto-completions, :set completions can be updated more often than
|
9 adaptive timeout for auto-completions, :set completions can be updated more often than
|
||||||
|
|||||||
Reference in New Issue
Block a user