aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorLewis Russell <lewis6991@gmail.com>2022-08-06 13:53:37 +0100
committerGitHub <noreply@github.com>2022-08-06 13:53:37 +0100
commit0fdf59ac9d30d8874ba6eba22a8bdfb41c1603b7 (patch)
treee8bb8505e9a341a5b675893b0cfc73882f41bb57 /src
parent0df1418ffab4e9e514422b7074386519fb0d28b2 (diff)
downloadrneovim-0fdf59ac9d30d8874ba6eba22a8bdfb41c1603b7.tar.gz
rneovim-0fdf59ac9d30d8874ba6eba22a8bdfb41c1603b7.tar.bz2
rneovim-0fdf59ac9d30d8874ba6eba22a8bdfb41c1603b7.zip
fix(api): nvim_cmd handle 0 range (#19655)
Fixes #19608
Diffstat (limited to 'src')
-rw-r--r--src/nvim/ex_docmd.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/nvim/ex_docmd.c b/src/nvim/ex_docmd.c
index 422f195198..b1130cd4dd 100644
--- a/src/nvim/ex_docmd.c
+++ b/src/nvim/ex_docmd.c
@@ -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