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/window.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/window.hh')
| -rw-r--r-- | src/window.hh | 17 |
1 files changed, 7 insertions, 10 deletions
diff --git a/src/window.hh b/src/window.hh index 33fed537..3b8928db 100644 --- a/src/window.hh +++ b/src/window.hh @@ -3,9 +3,8 @@ #include "completion.hh" #include "display_buffer.hh" -#include "editor.hh" -#include "highlighter.hh" #include "highlighter.hh" +#include "selection.hh" #include "hook_manager.hh" #include "option_manager.hh" #include "keymap_manager.hh" @@ -13,13 +12,8 @@ namespace Kakoune { -// A Window is an editing view onto a Buffer -// -// The Window class is an interactive Editor adding display functionalities -// to the editing ones already provided by the Editor class. -// Display can be customized through the use of highlighters handled by -// the window's HighlighterGroup -class Window : public Editor, public OptionManagerWatcher +// A Window is a view onto a Buffer +class Window : public SafeCountable, public OptionManagerWatcher { public: Window(Buffer& buffer); @@ -50,6 +44,8 @@ public: KeymapManager& keymaps() { return m_keymaps; } const KeymapManager& keymaps() const { return m_keymaps; } + Buffer& buffer() const { return *m_buffer; } + size_t timestamp() const { return m_timestamp; } void forget_timestamp() { m_timestamp = -1; } @@ -59,8 +55,9 @@ private: Window(const Window&) = delete; void on_option_changed(const Option& option) override; + void scroll_to_keep_selection_visible_ifn(const Context& context); - void scroll_to_keep_selection_visible_ifn(const Range& selection); + safe_ptr<Buffer> m_buffer; DisplayCoord m_position; DisplayCoord m_dimensions; |
