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.
This commit is contained in:
Thomas Vigouroux
2021-08-17 15:56:37 +02:00
committed by Axel Dahlberg
parent b1757e1c29
commit 8a4e26c6fe
13 changed files with 131 additions and 21 deletions

View File

@@ -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