aboutsummaryrefslogtreecommitdiffhomepage
path: root/qbuffers.h
diff options
context:
space:
mode:
authorRobin Haberkorn <robin.haberkorn@googlemail.com>2012-11-10 21:00:33 +0100
committerRobin Haberkorn <robin.haberkorn@googlemail.com>2012-11-10 21:00:33 +0100
commita59315f2f37b99dcee66ce0e875838b4a28ee253 (patch)
tree1d86be5d89dc5a992d9ffb494d029aab9f906b5e /qbuffers.h
parent406ddaa73a75e34eb57db18dfc62c7d8208d141a (diff)
support 0EB...$ command
* same as EB...$, but displays the buffer ring in the filename popup with the current file highlighted immediately after the EB
Diffstat (limited to 'qbuffers.h')
-rw-r--r--qbuffers.h16
1 files changed, 15 insertions, 1 deletions
diff --git a/qbuffers.h b/qbuffers.h
index eb4c2d4..b837423 100644
--- a/qbuffers.h
+++ b/qbuffers.h
@@ -50,6 +50,12 @@ public:
g_free(filename);
}
+ inline Buffer *
+ next(void)
+ {
+ return LIST_NEXT(this, buffers);
+ }
+
inline void
set_filename(const gchar *filename)
{
@@ -82,15 +88,22 @@ public:
extern class Ring {
LIST_HEAD(Head, Buffer) head;
- Buffer *current;
public:
+ Buffer *current;
+
Ring() : current(NULL)
{
LIST_INIT(&head);
}
~Ring();
+ inline Buffer *
+ first(void)
+ {
+ return LIST_FIRST(&head);
+ }
+
Buffer *find(const gchar *filename);
bool edit(const gchar *filename);
@@ -119,6 +132,7 @@ class StateFile : public StateExpectString {
private:
void do_edit(const gchar *filename);
+ void initial(void);
State *done(const gchar *str);
};