summaryrefslogtreecommitdiff
path: root/src/input_handler.hh
diff options
context:
space:
mode:
authorMaxime Coste <frrrwww@gmail.com>2015-06-03 20:03:06 +0100
committerMaxime Coste <frrrwww@gmail.com>2015-06-03 20:03:06 +0100
commitf0886ad323f92b42e9380eca359b277a71781f32 (patch)
tree9916cd6bea9ecfd2c52dc6fe0a27155b3534f56d /src/input_handler.hh
parent964b0e9a6ee0672da725450c856315244e6f68c5 (diff)
Get rid of the mode trash, delete mode directly when leaving on_key
Diffstat (limited to 'src/input_handler.hh')
-rw-r--r--src/input_handler.hh4
1 files changed, 1 insertions, 3 deletions
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<std::unique_ptr<InputMode>> m_mode_stack;
- Vector<std::unique_ptr<InputMode>> 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<InputMode> pop_mode(InputMode* current_mode);
using Insertion = std::pair<InsertMode, Vector<Key>>;
Insertion m_last_insert = {InsertMode::Insert, {}};