1
0
mirror of https://github.com/gryf/pentadactyl-pm.git synced 2026-01-07 17:54:10 +01:00

Display a message from :scriptnames when no scripts have been sourced.

This commit is contained in:
Doug Kearns
2011-04-04 22:11:30 +10:00
parent 8ef77adb1c
commit d960ede32e
2 changed files with 8 additions and 3 deletions

View File

@@ -783,9 +783,13 @@ unlet s:cpo_save
commands.add(["scrip[tnames]"],
"List all sourced script names",
function () {
modules.commandline.commandOutput(
template.tabular(["<SNR>", "Filename"], ["text-align: right; padding-right: 1em;"],
([i + 1, file] for ([i, file] in Iterator(io._scriptNames))))); // TODO: add colon and remove column titles for pedantic Vim compatibility?
if (!io._scriptNames.length)
dactyl.echomsg(_("command.scriptnames.none"));
else
modules.commandline.commandOutput(
template.tabular(["<SNR>", "Filename"], ["text-align: right; padding-right: 1em;"],
([i + 1, file] for ([i, file] in Iterator(io._scriptNames))))); // TODO: add colon and remove column titles for pedantic Vim compatibility?
},
{ argCount: "0" });