summaryrefslogtreecommitdiff
path: root/src/editor.hh
diff options
context:
space:
mode:
authorMaxime Coste <frrrwww@gmail.com>2013-12-15 18:07:51 +0000
committerMaxime Coste <frrrwww@gmail.com>2013-12-15 20:23:02 +0000
commit7267b8281fbcc21d96bb8cb760d2a4e881b4d5e5 (patch)
tree74891181f3d7b078bb6e1f4424e0449d843ac626 /src/editor.hh
parente369b60258ba48eeeb53a91d15e6ae1a9bb6f10f (diff)
Move insert and erase to normal.cc, and move edition management to context
Diffstat (limited to 'src/editor.hh')
-rw-r--r--src/editor.hh26
1 files changed, 0 insertions, 26 deletions
diff --git a/src/editor.hh b/src/editor.hh
index 5a468279..d98feecc 100644
--- a/src/editor.hh
+++ b/src/editor.hh
@@ -38,13 +38,6 @@ public:
Buffer& buffer() const { return *m_buffer; }
- void erase();
-
- void insert(const String& string,
- InsertMode mode = InsertMode::Insert);
- void insert(memoryview<String> strings,
- InsertMode mode = InsertMode::Insert);
-
const SelectionList& selections() const { return m_selections; }
SelectionList& selections() { return m_selections; }
std::vector<String> selections_content() const;
@@ -52,14 +45,9 @@ public:
bool undo();
bool redo();
- bool is_editing() const { return m_edition_level!= 0; }
private:
friend struct scoped_edition;
friend class InputModes::Insert;
- void begin_edition();
- void end_edition();
-
- int m_edition_level;
void check_invariant() const;
@@ -67,20 +55,6 @@ private:
DynamicSelectionList m_selections;
};
-struct scoped_edition
-{
- scoped_edition(Editor& editor)
- : m_editor(editor)
- { m_editor.begin_edition(); }
-
- ~scoped_edition()
- { m_editor.end_edition(); }
-
- Editor& editor() const { return m_editor; }
-private:
- Editor& m_editor;
-};
-
}
#endif // editor_hh_INCLUDED