aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/ring.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/ring.cpp')
-rw-r--r--src/ring.cpp15
1 files changed, 15 insertions, 0 deletions
diff --git a/src/ring.cpp b/src/ring.cpp
index 03cda37..fdd8206 100644
--- a/src/ring.cpp
+++ b/src/ring.cpp
@@ -173,6 +173,21 @@ Ring::UndoTokenEdit::run(void)
buffer = NULL;
}
+tecoInt
+Ring::get_id(Buffer *buffer)
+{
+ tecoInt ret = 0;
+ Buffer *cur;
+
+ TAILQ_FOREACH(cur, &head, buffers) {
+ ret++;
+ if (cur == buffer)
+ break;
+ }
+
+ return ret;
+}
+
Buffer *
Ring::find(const gchar *filename)
{