From d84163607f73e1091b06fd19a3d45cccc23f8e9b Mon Sep 17 00:00:00 2001
From: "p.kosyh"
Date: Tue, 22 Jun 2010 09:00:29 +0000
Subject: [PATCH] going to goto wo return
---
stead/goto.lua | 8 ++++++++
stead/stead.lua | 5 ++++-
2 files changed, 12 insertions(+), 1 deletion(-)
diff --git a/stead/goto.lua b/stead/goto.lua
index f523892..719b300 100644
--- a/stead/goto.lua
+++ b/stead/goto.lua
@@ -88,3 +88,11 @@ go = function (self, where, back)
end
return res;
end
+
+go = hook(go, function(f, ...)
+ local r,v = f(unpack(arg))
+ if type(r) == 'string' then
+ pr (r)
+ end
+ return r,v
+end)
diff --git a/stead/stead.lua b/stead/stead.lua
index ab4f293..55b8889 100644
--- a/stead/stead.lua
+++ b/stead/stead.lua
@@ -652,7 +652,10 @@ function call(v, n, ...)
if type(v[n]) == 'function' then
callpush(v, unpack(arg))
local a,b = v[n](v, unpack(arg));
- if a == nil and b == nil then
+ if a == false and b == nil then
+ b = a
+ a = stead.pget()
+ elseif a == nil and b == nil then
a = stead.pget()
b = nil
end