Browse Source

Merge branch 'master' of https://src.libcode.org/pkun/klish

Serj Kalichev 10 months ago
parent
commit
9a34f398d3
1 changed files with 5 additions and 3 deletions
  1. 5 3
      plugins/lua/klish_lua.c

+ 5 - 3
plugins/lua/klish_lua.c

@@ -315,9 +315,11 @@ static int _luaB_par(lua_State *L, int parent, int multi)
 		const char *n = kentry_name(entry);
 		if (!name) {
 			if (last_entry != entry) {
-				lua_pushnumber(L, ++k);
-				lua_pushstring(L, n);
-				lua_rawset(L, -3);
+				if (!kentry_container(entry)) {
+					lua_pushnumber(L, ++k);
+					lua_pushstring(L, n);
+					lua_rawset(L, -3);
+				}
 				lua_pushstring(L, n);
 				lua_newtable(L);
 				lua_rawset(L, -3);