feat(api): make nvim_parse_cmd and nvim_cmd support :filter

Also fixes a memory leak in `parse_cmdline`.

Closes #18954.
This commit is contained in:
Famiu Haque
2022-06-28 16:22:29 +06:00
parent ee6b21e843
commit 606ec8b708
7 changed files with 157 additions and 16 deletions

View File

@@ -2404,7 +2404,7 @@ static bool cmdpreview_may_show(CommandLineState *s)
// Check if command is previewable, if not, don't attempt to show preview
if (!(ea.argt & EX_PREVIEW)) {
vim_regfree(cmdinfo.cmdmod.cmod_filter_regmatch.regprog);
undo_cmdmod(&cmdinfo.cmdmod);
goto end;
}