libs: fix callback call and untab

Signed-off-by: Julien Danjou <julien@danjou.info>
This commit is contained in:
Fabienne Ducroquet 2008-08-10 08:04:09 +02:00 committed by Julien Danjou
parent 36cf917890
commit 0348b0566e
2 changed files with 2 additions and 3 deletions

View File

@ -10,7 +10,6 @@ local assert = assert
local loadstring = loadstring
local ipairs = ipairs
local pairs = pairs
local unpack = unpack
local os = os
local io = io
local math = math
@ -569,7 +568,7 @@ end
-- @param name Hook name.
function hooks.user.call(name, ...)
for name, callback in pairs(hooks[name].callbacks) do
callback(unpack(args))
callback(...)
end
end

View File

@ -159,7 +159,7 @@ function untab(cl)
local cindex = findkey(tabbed[tabindex][2], c)
if tabbed[tabindex][1] == c then
display(tabindex, P.next(tabindex, c))
display(tabindex, next(tabindex, c))
end
table.remove(tabbed[tabindex][2], cindex)