Hi Rob,
> It's been a week since I posted this patch, and I haven't seen any
> response. If you guys don't want to incorporate my patch into Vim,
> that's ok; I'd just like to know if I need to fix anything up, or if
> it needs to get vetted or something.
Sorry for the delay in checking your patch. Can you please check if this
luaV_debug works instead of your luaV_debug_debug? It's simpler and more in
line with Lua's original debug.debug:
static int
luaV_debug (lua_State *L)
{
lua_settop(L, 0);
lua_getglobal(L, "vim");
lua_getfield(L, -1, "eval");
lua_remove(L, -2); /* vim.eval at position 1 */
for (;;)
{
const char *input;
size_t l;
lua_pushvalue(L, 1); /* vim.eval */
lua_pushliteral(L, "input('lua_debug> ')");
lua_call(L, 1, 1, 0); /* return string */
input = lua_tolstring(L, -1, &l);
if (l == 0 || strcmp(input, "cont") == 0)
return 0;
if (luaL_loadbuffer(L, input, l, "=(debug command)") ||
lua_pcall(L, 0, 0, 0))
luaV_emsg(L);
lua_settop(L, 1); /* remove eventual returns, but keep vim.eval */
}
}
If it works, can you please also product a patch?
Cheers,
Luis
--
Computers are useless. They can only give you answers.
-- Pablo Picasso
--
Luis Carvalho (Kozure)
lua -e 'print((("[email protected]"):gsub("(%u+%.)","")))'
--
You received this message from the "vim_dev" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php