From ebd768e03d0f77dec5c05f9968e749a977423ece Mon Sep 17 00:00:00 2001 From: Maxime Coste Date: Sat, 26 Oct 2013 11:49:16 +0100 Subject: [PATCH] remove unneeded code in client --- src/client.cc | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/src/client.cc b/src/client.cc index 3b9827d6..08c72081 100644 --- a/src/client.cc +++ b/src/client.cc @@ -39,7 +39,7 @@ public: Insertion& last_insert() { return m_client.m_last_insert; } protected: - InputMode& reset_normal_mode(); + void reset_normal_mode(); private: Client& m_client; }; @@ -850,9 +850,6 @@ public: void on_key(Key key) override { - if (&context().editor() != &m_inserter.editor()) - return reset_normal_mode().on_key(key); - last_insert().second.push_back(key); if (m_mode == Mode::InsertReg) { @@ -954,10 +951,9 @@ private: } -InputMode& InputMode::reset_normal_mode() +void InputMode::reset_normal_mode() { m_client.reset_normal_mode(); - return *m_client.m_mode; } Client::Client(std::unique_ptr&& ui, Editor& editor, String name)