summaryrefslogtreecommitdiff
path: root/src/buffer_manager.hh
diff options
context:
space:
mode:
authorMaxime Coste <frrrwww@gmail.com>2011-11-12 14:06:49 +0000
committerMaxime Coste <frrrwww@gmail.com>2011-11-12 14:06:49 +0000
commitf5ad32f1373d68db7e9f3170f2a306c3c5195b8c (patch)
treebebe38bb7fd9c260920422af8d21d1a9a770208c /src/buffer_manager.hh
parent82baa55eed7f908a02b9b60260e0e5cd78a9ad4d (diff)
Completion: decentralise, move buffer name completion to BufferManager
Diffstat (limited to 'src/buffer_manager.hh')
-rw-r--r--src/buffer_manager.hh10
1 files changed, 7 insertions, 3 deletions
diff --git a/src/buffer_manager.hh b/src/buffer_manager.hh
index 126b41a3..ee3473cd 100644
--- a/src/buffer_manager.hh
+++ b/src/buffer_manager.hh
@@ -2,6 +2,7 @@
#define buffer_manager_hh_INCLUDED
#include "buffer.hh"
+#include "completion.hh"
#include "utils.hh"
#include <unordered_map>
@@ -25,14 +26,17 @@ public:
Buffer* operator->() const { return parent_type::operator*().second.get(); }
};
- iterator begin() const { return iterator(m_buffers.begin()); }
- iterator end() const { return iterator(m_buffers.end()); }
-
void register_buffer(Buffer* buffer);
void delete_buffer(Buffer* buffer);
+ iterator begin() const { return iterator(m_buffers.begin()); }
+ iterator end() const { return iterator(m_buffers.end()); }
+
Buffer* get_buffer(const std::string& name);
+ CandidateList complete_buffername(const std::string& prefix,
+ size_t cursor_pos = std::string::npos);
+
private:
BufferMap m_buffers;
};