fix(events): make v:event readonly in more events (#18070)

This makes v:event readonly in these four events:
- ChanInfo
- ChanOpen
- RecordingLeave
- TermClose
This commit is contained in:
zeertzjq
2022-04-11 11:32:15 +08:00
committed by GitHub
parent cdfb045ea0
commit f89ca7194f
4 changed files with 35 additions and 0 deletions

View File

@@ -944,6 +944,7 @@ int do_record(int c)
buf[0] = (char)regname;
buf[1] = NUL;
(void)tv_dict_add_str(dict, S_LEN("regname"), buf);
tv_dict_set_keys_readonly(dict);
// Get the recorded key hits. K_SPECIAL will be escaped, this
// needs to be removed again to put it in a register. exec_reg then