diff options
| author | Maxime Coste <frrrwww@gmail.com> | 2014-07-30 01:08:55 +0100 |
|---|---|---|
| committer | Maxime Coste <frrrwww@gmail.com> | 2014-07-30 01:09:04 +0100 |
| commit | 9fe4724743a67514cdf8e645243e4a7cf435b1b5 (patch) | |
| tree | 8ef9ba31069b0d26b358aa4fc4022d708a81b7c1 /src/normal.cc | |
| parent | c6eea12f76e9cd5b09789583b6caa2a2513c84b7 (diff) | |
Stop macro recording on esc in normal mode
Fixes #221
Diffstat (limited to 'src/normal.cc')
| -rw-r--r-- | src/normal.cc | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/src/normal.cc b/src/normal.cc index e4b7e76f..98ff8ae4 100644 --- a/src/normal.cc +++ b/src/normal.cc @@ -971,6 +971,12 @@ void start_or_end_macro_recording(Context& context, int) }, "record macro", "enter macro name "); } +void end_macro_recording(Context& context, int) +{ + if (context.input_handler().is_recording()) + context.input_handler().stop_recording(); +} + void replay_macro(Context& context, int count) { on_next_key_with_autoinfo(context, [count](Key key, Context& context) mutable { @@ -1359,6 +1365,8 @@ KeyMap keymap = { 'q', { "replay recorded macro", replay_macro } }, { 'Q', { "start or end macro recording", start_or_end_macro_recording } }, + { Key::Escape, { "end macro recording", end_macro_recording } }, + { '`', { "convert to lower case in selections", for_each_char<to_lower> } }, { '~', { "convert to upper case in selections", for_each_char<to_upper> } }, { alt('`'), { "swap case in selections", for_each_char<swap_case> } }, |
