diff options
| author | Maxime Coste <mawww@kakoune.org> | 2017-11-08 14:39:52 +0800 |
|---|---|---|
| committer | Maxime Coste <mawww@kakoune.org> | 2017-11-08 14:39:52 +0800 |
| commit | 0942cd5084b08ff2154725faa06e800b8536922c (patch) | |
| tree | bb86cfcb343a64dd8fbf1b1d09d4610182a76dd2 /src/input_handler.hh | |
| parent | 04993de68765d64e6da882e4fd055fdc07bd736b (diff) | |
InputHandler: handle of last insert keys happening in nested modes
Move recording of keys to the input handler itself instead of the
Insert mode so that eventual nested modes (potentially introduced
by <a-;> will get their keys recorded as well).
Fixes #1680
Diffstat (limited to 'src/input_handler.hh')
| -rw-r--r-- | src/input_handler.hh | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/src/input_handler.hh b/src/input_handler.hh index 9b23308c..663fd81b 100644 --- a/src/input_handler.hh +++ b/src/input_handler.hh @@ -116,8 +116,13 @@ private: void push_mode(InputMode* new_mode); void pop_mode(InputMode* current_mode); - struct Insertion{ InsertMode mode; Vector<Key> keys; bool disable_hooks; int count; }; - Insertion m_last_insert = { InsertMode::Insert, {}, false, 1 }; + struct Insertion{ + NestedBool recording; + InsertMode mode; + Vector<Key> keys; + bool disable_hooks; + int count; + } m_last_insert = { {}, InsertMode::Insert, {}, false, 1 }; char m_recording_reg = 0; String m_recorded_keys; |
