cleanup editor.hh, remove editor.cc...

This commit is contained in:
Maxime Coste 2013-12-15 20:53:29 +00:00
parent f83d5672f8
commit 6641583a68
2 changed files with 5 additions and 29 deletions

View File

@ -1,19 +0,0 @@
#include "editor.hh"
#include "exception.hh"
#include "register.hh"
#include "register_manager.hh"
#include "utf8_iterator.hh"
#include "utils.hh"
#include <array>
namespace Kakoune
{
Editor::Editor(Buffer& buffer)
: m_buffer(&buffer),
m_selections(buffer, {BufferCoord{}})
{}
}

View File

@ -8,20 +8,15 @@
namespace Kakoune namespace Kakoune
{ {
namespace InputModes { class Insert; } // An Editor is a to be removed class from the past
class Register;
// An Editor is a buffer mutator
//
// The Editor class provides methods to manipulate a set of selections
// and to use these selections to mutate it's buffer.
class Editor : public SafeCountable class Editor : public SafeCountable
{ {
public: public:
typedef std::function<void (const Buffer&, SelectionList&)> Selector; Editor(Buffer& buffer)
: m_buffer(&buffer),
m_selections(buffer, {BufferCoord{}})
{}
Editor(Buffer& buffer);
virtual ~Editor() {} virtual ~Editor() {}
Buffer& buffer() const { return *m_buffer; } Buffer& buffer() const { return *m_buffer; }