fix(api): nvim_cmd handle 0 range (#19655)

Fixes #19608
This commit is contained in:
Lewis Russell
2022-08-06 13:53:37 +01:00
committed by GitHub
parent 0df1418ffa
commit 0fdf59ac9d
2 changed files with 9 additions and 0 deletions

View File

@@ -1693,6 +1693,8 @@ int execute_cmd(exarg_T *eap, CmdParseInfo *cmdinfo, bool preview)
ERROR(_(e_cannot_edit_other_buf));
}
correct_range(eap);
if (((eap->argt & EX_WHOLEFOLD) || eap->addr_count >= 2) && !global_busy
&& eap->addr_type == ADDR_LINES) {
// Put the first line at the start of a closed fold, put the last line