diff options
author | zeertzjq <zeertzjq@outlook.com> | 2022-07-15 16:49:00 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-07-15 16:49:00 +0800 |
commit | 564d99c89a3d9a236df758d320cc38abc50215ec (patch) | |
tree | 9798e6718ce448953e32caf604641b063f58b5fc /src/nvim/ex_docmd.c | |
parent | 9777907467b29e890556db287b6a9995c0024896 (diff) | |
parent | a649af4dbaba5ef13dcbf610fe584dbc67cf2435 (diff) | |
download | rneovim-564d99c89a3d9a236df758d320cc38abc50215ec.tar.gz rneovim-564d99c89a3d9a236df758d320cc38abc50215ec.tar.bz2 rneovim-564d99c89a3d9a236df758d320cc38abc50215ec.zip |
Merge pull request #19373 from zeertzjq/vim-8.2.0426
vim-patch:8.0.1118,8.2.0426
Diffstat (limited to 'src/nvim/ex_docmd.c')
-rw-r--r-- | src/nvim/ex_docmd.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/nvim/ex_docmd.c b/src/nvim/ex_docmd.c index 9e8262fdfc..4e6846bf21 100644 --- a/src/nvim/ex_docmd.c +++ b/src/nvim/ex_docmd.c @@ -4616,8 +4616,9 @@ char *invalid_range(exarg_T *eap) } break; case ADDR_BUFFERS: - if (eap->line1 < firstbuf->b_fnum - || eap->line2 > lastbuf->b_fnum) { + // Only a boundary check, not whether the buffers actually + // exist. + if (eap->line1 < 1 || eap->line2 > get_highest_fnum()) { return _(e_invrange); } break; |