diff options
| author | Marc André Tanner <mat@brain-dump.org> | 2016-11-27 21:21:31 +0100 |
|---|---|---|
| committer | Marc André Tanner <mat@brain-dump.org> | 2016-11-28 11:53:04 +0100 |
| commit | 6f01f6891f6654cf1f38907960cd9b96a8bb64d8 (patch) | |
| tree | 1e8e5b86b06b059321db1ebecf207bbb33c95b52 /vis-lua.c | |
| parent | 82339f5b6298b0d641a865894866448220b5d84e (diff) | |
| download | vis-6f01f6891f6654cf1f38907960cd9b96a8bb64d8.tar.gz vis-6f01f6891f6654cf1f38907960cd9b96a8bb64d8.tar.xz | |
vis-lua: add file.path property denoting the absolute path to the file
Close #407
Diffstat (limited to 'vis-lua.c')
| -rw-r--r-- | vis-lua.c | 5 |
1 files changed, 5 insertions, 0 deletions
@@ -1096,6 +1096,11 @@ static int file_index(lua_State *L) { return 1; } + if (strcmp(key, "path") == 0) { + lua_pushstring(L, file->name); + return 1; + } + if (strcmp(key, "lines") == 0) { obj_ref_new(L, file->text, "vis.file.text"); return 1; |
