aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/api/command.c
diff options
context:
space:
mode:
authorFamiu Haque <famiuhaque@protonmail.com>2022-06-28 11:00:05 +0600
committerGitHub <noreply@github.com>2022-06-28 13:00:05 +0800
commit7e1cf6b7642f0ab14656d853d44f4409b2987b9c (patch)
treec3f05b626f2d3e57da42f2d19dc713096246ec1f /src/nvim/api/command.c
parent274609a109fe7d4a72107e45fd1f13c2066a3663 (diff)
downloadrneovim-7e1cf6b7642f0ab14656d853d44f4409b2987b9c.tar.gz
rneovim-7e1cf6b7642f0ab14656d853d44f4409b2987b9c.tar.bz2
rneovim-7e1cf6b7642f0ab14656d853d44f4409b2987b9c.zip
fix(inccommand): parse the command to check if it is previewable
Free regprog if command isn't previewable Co-authored-by: zeertzjq <zeertzjq@outlook.com>
Diffstat (limited to 'src/nvim/api/command.c')
-rw-r--r--src/nvim/api/command.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/nvim/api/command.c b/src/nvim/api/command.c
index 141e1256ff..2b2fb446a0 100644
--- a/src/nvim/api/command.c
+++ b/src/nvim/api/command.c
@@ -13,6 +13,7 @@
#include "nvim/ex_docmd.h"
#include "nvim/lua/executor.h"
#include "nvim/ops.h"
+#include "nvim/regexp.h"
#include "nvim/window.h"
#ifdef INCLUDE_GENERATED_DECLARATIONS
@@ -94,6 +95,7 @@ Dictionary nvim_parse_cmd(String str, Dictionary opts, Error *err)
}
goto end;
}
+ vim_regfree(cmdinfo.cmdmod.cmod_filter_regmatch.regprog);
// Parse arguments
Array args = ARRAY_DICT_INIT;