diff options
Diffstat (limited to 'src/nvim/ops.c')
-rw-r--r-- | src/nvim/ops.c | 22 |
1 files changed, 10 insertions, 12 deletions
diff --git a/src/nvim/ops.c b/src/nvim/ops.c index 52c382028e..c6f9c5f04f 100644 --- a/src/nvim/ops.c +++ b/src/nvim/ops.c @@ -38,7 +38,6 @@ #include "nvim/memline.h" #include "nvim/memory.h" #include "nvim/message.h" -#include "nvim/misc1.h" #include "nvim/mouse.h" #include "nvim/move.h" #include "nvim/normal.h" @@ -913,13 +912,14 @@ int do_record(int c) showmode(); regname = c; retval = OK; - } - } else { // stop recording - /* - * Get the recorded key hits. K_SPECIAL and CSI will be escaped, this - * needs to be removed again to put it in a register. exec_reg then - * adds the escaping back later. - */ + apply_autocmds(EVENT_RECORDINGENTER, NULL, NULL, false, curbuf); + } + } else { // stop recording + // Get the recorded key hits. K_SPECIAL and CSI will be escaped, this + // needs to be removed again to put it in a register. exec_reg then + // adds the escaping back later. + apply_autocmds(EVENT_RECORDINGLEAVE, NULL, NULL, false, curbuf); + reg_recorded = reg_recording; reg_recording = 0; if (ui_has(kUIMessages)) { showmode(); @@ -933,10 +933,8 @@ int do_record(int c) // Remove escaping for CSI and K_SPECIAL in multi-byte chars. vim_unescape_csi(p); - /* - * We don't want to change the default register here, so save and - * restore the current register name. - */ + // We don't want to change the default register here, so save and + // restore the current register name. old_y_previous = y_previous; retval = stuff_yank(regname, p); |