From 8a4e26c6fe7530a0e24268cd373f0d4e53fe81e1 Mon Sep 17 00:00:00 2001 From: Thomas Vigouroux Date: Tue, 17 Aug 2021 15:56:37 +0200 Subject: feat(autocmd): add Recording autocmds feat(eval): add reg_recorded() This function is used the get the last recorded register. style(Recording): rename handler to match suggestions fix(RecordingLeave): send autocommand earlier This makes the autocommand fire just before setting reg_recorded to reg_recording, this way we clearly show that we are actually just before actually quitting the recording mode. --- src/nvim/eval/funcs.c | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'src/nvim/eval/funcs.c') diff --git a/src/nvim/eval/funcs.c b/src/nvim/eval/funcs.c index 5252c940f7..d43eeb4a15 100644 --- a/src/nvim/eval/funcs.c +++ b/src/nvim/eval/funcs.c @@ -7398,6 +7398,11 @@ static void f_reg_recording(typval_T *argvars, typval_T *rettv, FunPtr fptr) return_register(reg_recording, rettv); } +static void f_reg_recorded(typval_T *argvars, typval_T *rettv, FunPtr fptr) +{ + return_register(reg_recorded, rettv); +} + /// list2proftime - convert a List to proftime_T /// /// @param arg The input list, must be of type VAR_LIST and have -- cgit