goto form exit
This commit is contained in:
parent
22c533ea42
commit
0f538b8238
|
@ -27,7 +27,7 @@ go = function (self, where, back)
|
|||
error ("Do not use goto from left/entered action! Use exit/enter action instead:" .. self.where);
|
||||
end
|
||||
|
||||
local v, r;
|
||||
local v, r, jump;
|
||||
|
||||
if not isVroom(ref(where)) and not stead.in_exit_call then
|
||||
stead.in_exit_call = true -- to break recurse
|
||||
|
@ -36,6 +36,10 @@ go = function (self, where, back)
|
|||
if r == false then
|
||||
return v, ret(r)
|
||||
end
|
||||
if self.where ~= was then
|
||||
where = deref(self.where) -- jump
|
||||
jump = true
|
||||
end
|
||||
end
|
||||
|
||||
local res = v;
|
||||
|
@ -45,7 +49,7 @@ go = function (self, where, back)
|
|||
self.where = deref(where);
|
||||
end
|
||||
|
||||
if not back or not isDialog(ref(was)) or isDialog(ref(where)) then
|
||||
if not jump and (not back or not isDialog(ref(was)) or isDialog(ref(where))) then
|
||||
v, r = call(ref(where), 'enter', deref(was));
|
||||
if r == false then
|
||||
self.where = was;
|
||||
|
|
Loading…
Reference in a new issue