diff options
| author | Maxime Coste <frrrwww@gmail.com> | 2013-12-20 20:10:08 +0000 |
|---|---|---|
| committer | Maxime Coste <frrrwww@gmail.com> | 2013-12-20 20:14:57 +0000 |
| commit | c0973075fafc7003be1028922bf99a2c48bcdcd6 (patch) | |
| tree | 303d3d6b03942857775f7c0d2e15d621a6f6df37 /src/client_manager.hh | |
| parent | cb324a4b8842d6d45a7dba316cd4f909addb99c2 (diff) | |
Get rid of Editor for good
ClientManager now stores only the free windows, clients take
ownership of its own.
Diffstat (limited to 'src/client_manager.hh')
| -rw-r--r-- | src/client_manager.hh | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/src/client_manager.hh b/src/client_manager.hh index 2e6638e7..9c32404a 100644 --- a/src/client_manager.hh +++ b/src/client_manager.hh @@ -8,6 +8,9 @@ namespace Kakoune struct client_removed{}; +using WindowAndSelections = std::tuple<std::unique_ptr<Window>, + DynamicSelectionList>; + class ClientManager : public Singleton<ClientManager> { public: @@ -20,9 +23,11 @@ public: bool empty() const { return m_clients.empty(); } size_t count() const { return m_clients.size(); } - Window& get_unused_window_for_buffer(Buffer& buffer); void ensure_no_client_uses_buffer(Buffer& buffer); + WindowAndSelections get_free_window(Buffer& buffer); + void add_free_window(std::unique_ptr<Window>&& window, SelectionList selections); + void redraw_clients() const; Client* get_client_ifp(const String& name); @@ -34,7 +39,7 @@ private: String generate_name() const; std::vector<std::unique_ptr<Client>> m_clients; - std::vector<std::unique_ptr<Window>> m_windows; + std::vector<WindowAndSelections> m_free_windows; }; } |
