xaizek / vifm (License: GPLv2+) (since 2018-12-07)
Vifm is a file manager with curses interface, which provides Vi[m]-like environment for managing objects within file systems, extended with some useful ideas from mutt.
Commit 9378992f2f7e72e65aa6370fcb49efded8477435

Comment lua_pop()s in lua_viewcolumn_handler()
Author: xaizek
Author date (UTC): 2026-06-06 10:43
Committer name: xaizek
Committer date (UTC): 2026-06-06 10:43
Parent(s): fab471979da7e6b093c87faf40301c8acc7cb515
Signing key: 99DC5E4DB05F6BE2
Tree: 5a499b4e9c980de9c3d39061c7933e7cb0a31155
File Lines added Lines deleted
src/lua/vifm_viewcolumns.c 5 5
File src/lua/vifm_viewcolumns.c changed (mode: 100644) (index 8c6b0b544..f241b5e59)
... ... lua_viewcolumn_handler(void *data, size_t buf_len, char buf[],
231 231 const char *error = lua_tostring(lua, -1); const char *error = lua_tostring(lua, -1);
232 232 ui_sb_err(error); ui_sb_err(error);
233 233 copy_str(buf, buf_len, "ERROR"); copy_str(buf, buf_len, "ERROR");
234 lua_pop(lua, 1);
234 lua_pop(lua, 1); /* error */
235 235 return; return;
236 236 } }
237 237
 
... ... lua_viewcolumn_handler(void *data, size_t buf_len, char buf[],
240 240 if(!lua_istable(lua, -1)) if(!lua_istable(lua, -1))
241 241 { {
242 242 copy_str(buf, buf_len, "NOVALUE"); copy_str(buf, buf_len, "NOVALUE");
243 lua_pop(lua, 1);
243 lua_pop(lua, 1); /* handler's result */
244 244 return; return;
245 245 } }
246 246
247 247 if(lua_getfield(lua, -1, "text") == LUA_TNIL) if(lua_getfield(lua, -1, "text") == LUA_TNIL)
248 248 { {
249 249 copy_str(buf, buf_len, "NOVALUE"); copy_str(buf, buf_len, "NOVALUE");
250 lua_pop(lua, 2);
250 lua_pop(lua, 2); /* text, handler's result */
251 251 return; return;
252 252 } }
253 253
254 254 const char *text = lua_tostring(lua, -1); const char *text = lua_tostring(lua, -1);
255 255 copy_str(buf, buf_len, (text == NULL ? "NOVALUE" : text)); copy_str(buf, buf_len, (text == NULL ? "NOVALUE" : text));
256 lua_pop(lua, 1);
256 lua_pop(lua, 1); /* text */
257 257
258 258 int has_start = (lua_getfield(lua, -1, "matchstart") == LUA_TNUMBER); int has_start = (lua_getfield(lua, -1, "matchstart") == LUA_TNUMBER);
259 259 int has_end = (lua_getfield(lua, -2, "matchend") == LUA_TNUMBER); int has_end = (lua_getfield(lua, -2, "matchend") == LUA_TNUMBER);
 
... ... lua_viewcolumn_handler(void *data, size_t buf_len, char buf[],
270 270 } }
271 271 } }
272 272
273 lua_pop(lua, 3);
273 lua_pop(lua, 3); /* matchend, matchstart, handler's result */
274 274 } }
275 275
276 276 /* vim: set tabstop=2 softtabstop=2 shiftwidth=2 noexpandtab cinoptions-=(0 : */ /* vim: set tabstop=2 softtabstop=2 shiftwidth=2 noexpandtab cinoptions-=(0 : */
Hints

Before first commit, do not forget to setup your git environment:
git config --global user.name "your_name_here"
git config --global user.email "your@email_here"

Clone this repository using HTTP(S):
git clone https://code.reversed.top/user/xaizek/vifm

Clone this repository using ssh (do not forget to upload a key first):
git clone ssh://rocketgit@code.reversed.top/user/xaizek/vifm

You are allowed to anonymously push to this repository.
This means that your pushed commits will automatically be transformed into a pull request:
... clone the repository ...
... make some changes and some commits ...
git push origin master