mirror of
https://github.com/gryf/pentadactyl-pm.git
synced 2026-01-01 09:22:26 +01:00
Use table tags in :addons and :downloads to better support :yank.
This commit is contained in:
@@ -61,6 +61,27 @@ var IO = Module("io", {
|
||||
services.downloadManager.addListener(this.downloadListener);
|
||||
},
|
||||
|
||||
CommandFileMode: Class("CommandFileMode", modules.CommandMode, {
|
||||
init: function init(prompt, params) {
|
||||
init.supercall(this);
|
||||
this.prompt = isArray(prompt) ? prompt : ["Question", prompt];
|
||||
update(this, params);
|
||||
},
|
||||
|
||||
historyKey: "file",
|
||||
|
||||
get mode() modules.modes.FILE_INPUT,
|
||||
|
||||
complete: function (context) {
|
||||
if (this.completer)
|
||||
this.completer(context);
|
||||
|
||||
context = context.fork("files", 0);
|
||||
modules.completion.file(context);
|
||||
context.filters = context.filters.concat(this.filters || []);
|
||||
}
|
||||
}),
|
||||
|
||||
destroy: function destroy() {
|
||||
services.downloadManager.removeListener(this.downloadListener);
|
||||
for (let [, plugin] in Iterator(plugins.contexts))
|
||||
@@ -1002,6 +1023,16 @@ unlet s:cpo_save
|
||||
}]);
|
||||
|
||||
},
|
||||
modes: function (dactyl, modules, window) {
|
||||
const { commandline, modes } = modules;
|
||||
|
||||
modes.addMode("FILE_INPUT", {
|
||||
extended: true,
|
||||
description: "Active when selecting a file",
|
||||
bases: [modes.COMMAND_LINE],
|
||||
input: true
|
||||
});
|
||||
},
|
||||
options: function (dactyl, modules, window) {
|
||||
const { options } = modules;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user