mirror of
https://github.com/gryf/pentadactyl-pm.git
synced 2025-12-22 21:07:59 +01:00
Display a message from :scriptnames when no scripts have been sourced.
This commit is contained in:
@@ -94,6 +94,7 @@ command.let.undefinedVar-1 = E121: Undefined variable: %S
|
|||||||
command.let.unexpectedChar = E18: Unexpected characters in :let
|
command.let.unexpectedChar = E18: Unexpected characters in :let
|
||||||
command.run.noPrevious = E34: No previous command
|
command.run.noPrevious = E34: No previous command
|
||||||
command.sanitize.privateMode = Cannot sanitize items in private mode
|
command.sanitize.privateMode = Cannot sanitize items in private mode
|
||||||
|
command.scriptnames.none = No sourced scripts found
|
||||||
command.set.errorParsing-1 = Error parsing :set command: %S
|
command.set.errorParsing-1 = Error parsing :set command: %S
|
||||||
command.set.numberRequired-2 = E521: Number required after =: %S=%S
|
command.set.numberRequired-2 = E521: Number required after =: %S=%S
|
||||||
command.set.unknownOption-1 = E518: Unknown option: %S
|
command.set.unknownOption-1 = E518: Unknown option: %S
|
||||||
|
|||||||
@@ -783,9 +783,13 @@ unlet s:cpo_save
|
|||||||
commands.add(["scrip[tnames]"],
|
commands.add(["scrip[tnames]"],
|
||||||
"List all sourced script names",
|
"List all sourced script names",
|
||||||
function () {
|
function () {
|
||||||
|
if (!io._scriptNames.length)
|
||||||
|
dactyl.echomsg(_("command.scriptnames.none"));
|
||||||
|
else
|
||||||
modules.commandline.commandOutput(
|
modules.commandline.commandOutput(
|
||||||
template.tabular(["<SNR>", "Filename"], ["text-align: right; padding-right: 1em;"],
|
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?
|
([i + 1, file] for ([i, file] in Iterator(io._scriptNames))))); // TODO: add colon and remove column titles for pedantic Vim compatibility?
|
||||||
|
|
||||||
},
|
},
|
||||||
{ argCount: "0" });
|
{ argCount: "0" });
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user