diff options
author | Gregory Anders <8965202+gpanders@users.noreply.github.com> | 2021-12-18 08:55:43 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-12-18 08:55:43 -0700 |
commit | 36758ba9a78ecf01ab8f654be08051015932983a (patch) | |
tree | 727a197fe984e45e8c68b1c5d67fae4f693d3f5c /src/nvim/ops.c | |
parent | 818ae74eaf6f4538ca61ee4ba703543b0caaff10 (diff) | |
parent | df50fb5859250fd90b6bceb1f741f39a370a5241 (diff) | |
download | rneovim-36758ba9a78ecf01ab8f654be08051015932983a.tar.gz rneovim-36758ba9a78ecf01ab8f654be08051015932983a.tar.bz2 rneovim-36758ba9a78ecf01ab8f654be08051015932983a.zip |
autocmd: RecordingEnter, RecordingLeave (#16684)
Diffstat (limited to 'src/nvim/ops.c')
-rw-r--r-- | src/nvim/ops.c | 21 |
1 files changed, 10 insertions, 11 deletions
diff --git a/src/nvim/ops.c b/src/nvim/ops.c index 9bc63477e9..c6f9c5f04f 100644 --- a/src/nvim/ops.c +++ b/src/nvim/ops.c @@ -912,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(); @@ -932,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); |