From 45adf051972f0883577281887cb1cb0a821e222e Mon Sep 17 00:00:00 2001
From: "p.kosyh"
Date: Sat, 30 Apr 2011 05:20:51 +0000
Subject: [PATCH] visits added
---
debian/changelog | 1 +
stead/goto.lua | 6 ++++++
2 files changed, 7 insertions(+)
diff --git a/debian/changelog b/debian/changelog
index cfe62b9..35ce31c 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -19,6 +19,7 @@ instead (1.4.0) unstable; urgency=low
* toggle_menu added;
* get_ticks added;
* bit_xxx bitwise operations added;
+ * visits() added;
-- Peter Kosyh Tue, 27 Apr 2011 11:01:00 +0400
diff --git a/stead/goto.lua b/stead/goto.lua
index 1e414be..7954b7d 100644
--- a/stead/goto.lua
+++ b/stead/goto.lua
@@ -168,6 +168,12 @@ function visited(w)
return w.__visited
end
+function visits(w)
+ local n = visited(w)
+ if not n then n = 0 end
+ return n
+end
+
iface.fmt = function(self, cmd, st, moved, r, av, objs, pv) -- st -- changed state (main win), move -- loc changed
local l
if st then