blob: 11f3ecee3e6b86107606b1ec27116638082771ad (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
|
#ifndef editor_hh_INCLUDED
#define editor_hh_INCLUDED
#include "buffer.hh"
#include "dynamic_selection_list.hh"
#include "memoryview.hh"
namespace Kakoune
{
// An Editor is a to be removed class from the past
class Editor : public SafeCountable
{
public:
Editor(Buffer& buffer)
: m_buffer(&buffer),
m_selections(buffer, {BufferCoord{}})
{}
virtual ~Editor() {}
Buffer& buffer() const { return *m_buffer; }
const SelectionList& selections() const { return m_selections; }
SelectionList& selections() { return m_selections; }
private:
safe_ptr<Buffer> m_buffer;
DynamicSelectionList m_selections;
};
}
#endif // editor_hh_INCLUDED
|