diff options
| author | Marc André Tanner <mat@brain-dump.org> | 2016-04-15 21:13:41 +0200 |
|---|---|---|
| committer | Marc André Tanner <mat@brain-dump.org> | 2016-04-15 21:13:41 +0200 |
| commit | 341b490b5981de164958eaf83fdf1ade9f85c764 (patch) | |
| tree | a3f1f75e8a3113a3484f75523383c7fc3ae1597c /vis-lua.c | |
| parent | d33040e87f89e7e8eb9a7442003bda6429f9c1a9 (diff) | |
| download | vis-341b490b5981de164958eaf83fdf1ade9f85c764.tar.gz vis-341b490b5981de164958eaf83fdf1ade9f85c764.tar.xz | |
vis-lua: add file.size to return file size in bytes
Diffstat (limited to 'vis-lua.c')
| -rw-r--r-- | vis-lua.c | 5 |
1 files changed, 5 insertions, 0 deletions
@@ -657,6 +657,11 @@ static int file_index(lua_State *L) { } return 1; } + + if (strcmp(key, "size") == 0) { + lua_pushunsigned(L, text_size(file->text)); + return 1; + } } return index_common(L); |
