diff options
| author | Marc André Tanner <mat@brain-dump.org> | 2016-04-23 11:44:11 +0200 |
|---|---|---|
| committer | Marc André Tanner <mat@brain-dump.org> | 2016-04-23 11:44:11 +0200 |
| commit | 436e2c1ff8ab8ac4f8bc4078312838c4fc5d226e (patch) | |
| tree | 75f81894eeb9aca9d241e8172d0ceefb200a56fc /vis-cmds.c | |
| parent | d6effd021d2aa2b6c452f229046a85c5f1a252a7 (diff) | |
| download | vis-436e2c1ff8ab8ac4f8bc4078312838c4fc5d226e.tar.gz vis-436e2c1ff8ab8ac4f8bc4078312838c4fc5d226e.tar.xz | |
vis: display lua search paths in :help output
Diffstat (limited to 'vis-cmds.c')
| -rw-r--r-- | vis-cmds.c | 15 |
1 files changed, 15 insertions, 0 deletions
@@ -1,6 +1,7 @@ /* this file is included from sam.c */ #include <termkey.h> +#include "vis-lua.h" #ifndef VIS_OPEN #define VIS_OPEN "vis-open" @@ -659,6 +660,20 @@ static bool cmd_help(Vis *vis, Win *win, Command *cmd, const char *argv[], Curso "(prefix with C-, S-, and M- for Ctrl, Shift and Alt respectively)\n\n"); print_symbolic_keys(vis, txt); + const char *paths = vis_lua_paths_get(vis); + if (paths) { + char *copy = strdup(paths); + text_appendf(txt, "\n Lua paths used to load runtime files " + "(? will be replaced by filename):\n\n"); + for (char *elem = copy, *next; elem; elem = next) { + if ((next = strstr(elem, ";"))) + *next++ = '\0'; + if (*elem) + text_appendf(txt, " %s\n", elem); + } + free (copy); + } + text_save(txt, NULL); return true; } |
