aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/ex_docmd.c
diff options
context:
space:
mode:
authorzeertzjq <zeertzjq@outlook.com>2022-07-08 17:43:05 +0800
committerzeertzjq <zeertzjq@outlook.com>2022-07-12 05:36:33 +0800
commit27fd17a79cd2c51e71077bdd896635188ad711b5 (patch)
tree7203add5f3ae1ca1dcc32334beb5f985543cb37c /src/nvim/ex_docmd.c
parenteea6a4f2a0ad089e0f92dfbc54c92d88c9fea51e (diff)
downloadrneovim-27fd17a79cd2c51e71077bdd896635188ad711b5.tar.gz
rneovim-27fd17a79cd2c51e71077bdd896635188ad711b5.tar.bz2
rneovim-27fd17a79cd2c51e71077bdd896635188ad711b5.zip
vim-patch:8.2.0243: insufficient code coverage for ex_docmd.c functions
Problem: Insufficient code coverage for ex_docmd.c functions. Solution: Add more tests. (Yegappan Lakshmanan, closes vim/vim#5618) https://github.com/vim/vim/commit/9f6277bdde97b7767ded43a0b5a2023eb601b3b7 Cherry-pick Test_window_only() from patch 8.2.0203. Cherry-pick a memory leak fix from patch 8.2.0399.
Diffstat (limited to 'src/nvim/ex_docmd.c')
-rw-r--r--src/nvim/ex_docmd.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/src/nvim/ex_docmd.c b/src/nvim/ex_docmd.c
index 2899e17039..0b40715857 100644
--- a/src/nvim/ex_docmd.c
+++ b/src/nvim/ex_docmd.c
@@ -908,6 +908,15 @@ int do_cmdline(char *cmdline, LineGetter fgetline, void *cookie, int flags)
msg_list = saved_msg_list;
+ // Cleanup if "cs_emsg_silent_list" remains.
+ if (cstack.cs_emsg_silent_list != NULL) {
+ eslist_T *elem, *temp;
+ for (elem = cstack.cs_emsg_silent_list; elem != NULL; elem = temp) {
+ temp = elem->next;
+ xfree(elem);
+ }
+ }
+
/*
* If there was too much output to fit on the command line, ask the user to
* hit return before redrawing the screen. With the ":global" command we do