From f0886ad323f92b42e9380eca359b277a71781f32 Mon Sep 17 00:00:00 2001 From: Maxime Coste Date: Wed, 3 Jun 2015 20:03:06 +0100 Subject: Get rid of the mode trash, delete mode directly when leaving on_key --- src/input_handler.hh | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) (limited to 'src/input_handler.hh') diff --git a/src/input_handler.hh b/src/input_handler.hh index 999f444b..19242ea8 100644 --- a/src/input_handler.hh +++ b/src/input_handler.hh @@ -81,19 +81,17 @@ public: const Context& context() const { return m_context; } DisplayLine mode_line() const; - void clear_mode_trash(); private: Context m_context; friend class InputMode; Vector> m_mode_stack; - Vector> m_mode_trash; InputMode& current_mode() const { return *m_mode_stack.back(); } void push_mode(InputMode* new_mode); - void pop_mode(InputMode* current_mode); + std::unique_ptr pop_mode(InputMode* current_mode); using Insertion = std::pair>; Insertion m_last_insert = {InsertMode::Insert, {}}; -- cgit v1.2.3