diff options
| author | Maxime Coste <frrrwww@gmail.com> | 2013-12-15 18:07:51 +0000 |
|---|---|---|
| committer | Maxime Coste <frrrwww@gmail.com> | 2013-12-15 20:23:02 +0000 |
| commit | 7267b8281fbcc21d96bb8cb760d2a4e881b4d5e5 (patch) | |
| tree | 74891181f3d7b078bb6e1f4424e0449d843ac626 /src/context.cc | |
| parent | e369b60258ba48eeeb53a91d15e6ae1a9bb6f10f (diff) | |
Move insert and erase to normal.cc, and move edition management to context
Diffstat (limited to 'src/context.cc')
| -rw-r--r-- | src/context.cc | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/src/context.cc b/src/context.cc index 35e28731..6e94b174 100644 --- a/src/context.cc +++ b/src/context.cc @@ -187,4 +187,18 @@ const SelectionList& Context::selections() const return editor().selections(); } +void Context::begin_edition() +{ + ++m_edition_level; +} + +void Context::end_edition() +{ + kak_assert(m_edition_level > 0); + if (m_edition_level == 1) + buffer().commit_undo_group(); + + --m_edition_level; +} + } |
