vim-patch:8.2.0301: insufficient testing for exception handling (#20016)

Problem:    Insufficient testing for exception handling and the "attention"
            prompt.
Solution:   Add test cases. (Yegappan Lakshmanan, closes vim/vim#5681)
b654103ad1

Fix memory leak from last char_u refactor.
This commit is contained in:
zeertzjq
2022-08-31 07:24:16 +08:00
committed by GitHub
parent 518b5c65b0
commit 5ff2ea6687
3 changed files with 171 additions and 8 deletions

View File

@@ -3111,8 +3111,7 @@ char *get_return_cmd(void *rettv)
char *tofree = NULL;
if (rettv != NULL) {
tofree = encode_tv2echo((typval_T *)rettv, NULL);
s = encode_tv2echo((typval_T *)rettv, NULL);
tofree = s = encode_tv2echo((typval_T *)rettv, NULL);
}
if (s == NULL) {
s = "";