diff options
| author | Maxime Coste <frrrwww@gmail.com> | 2012-09-26 20:07:06 +0200 |
|---|---|---|
| committer | Maxime Coste <frrrwww@gmail.com> | 2012-09-26 20:07:06 +0200 |
| commit | a2fd1528e6083e08848d0d4bfd6ca1ccb2fa855c (patch) | |
| tree | 617ed44383ca6187f6408deaf7dffcc6447c28c8 /src/context.hh | |
| parent | 77eb86bcdb4e2bf1b9663ccc0781abbbbd8b61bf (diff) | |
Move last insertion from Client to Context
Diffstat (limited to 'src/context.hh')
| -rw-r--r-- | src/context.hh | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/src/context.hh b/src/context.hh index 801cb289..05acef73 100644 --- a/src/context.hh +++ b/src/context.hh @@ -97,13 +97,16 @@ struct Context ui().print_status(status); } - int numeric_param() const { return m_numeric_param; } - void numeric_param(int param) { m_numeric_param = param; } + using Insertion = std::pair<InsertMode, std::vector<Key>>; + Insertion& last_insert() { return m_last_insert; } -public: + int& numeric_param() { return m_numeric_param; } +private: safe_ptr<Editor> m_editor; safe_ptr<Client> m_client; safe_ptr<UserInterface> m_ui; + + Insertion m_last_insert = {InsertMode::Insert, {}}; int m_numeric_param = 0; }; |
