From a2fd1528e6083e08848d0d4bfd6ca1ccb2fa855c Mon Sep 17 00:00:00 2001 From: Maxime Coste Date: Wed, 26 Sep 2012 20:07:06 +0200 Subject: Move last insertion from Client to Context --- src/context.hh | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) (limited to 'src/context.hh') 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>; + Insertion& last_insert() { return m_last_insert; } -public: + int& numeric_param() { return m_numeric_param; } +private: safe_ptr m_editor; safe_ptr m_client; safe_ptr m_ui; + + Insertion m_last_insert = {InsertMode::Insert, {}}; int m_numeric_param = 0; }; -- cgit v1.2.3