aboutsummaryrefslogtreecommitdiff
path: root/vis-lua.c
diff options
context:
space:
mode:
Diffstat (limited to 'vis-lua.c')
-rw-r--r--vis-lua.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/vis-lua.c b/vis-lua.c
index 1cb8c16..a2f5edc 100644
--- a/vis-lua.c
+++ b/vis-lua.c
@@ -1147,6 +1147,16 @@ static int vis_newindex(lua_State *L) {
vis_mode_switch(vis, mode);
return 0;
}
+
+ if (strcmp(key, "count") == 0) {
+ int count;
+ if (lua_isnil(L, 3))
+ count = VIS_COUNT_UNKNOWN;
+ else
+ count = luaL_checkunsigned(L, 3);
+ vis_count_set(vis, count);
+ return 1;
+ }
}
return newindex_common(L);
}