mirror of
https://github.com/neovim/neovim.git
synced 2025-09-20 02:08:17 +00:00
vim-patch:8.2.0426: some errors were not tested for
Problem: Some errors were not tested for.
Solution: Add tests. (Dominique Pelle, closes vim/vim#5824)
9b9be007e7
Cherry-pick get_highest_fnum() from patch 8.1.1908 to make tests pass.
This commit is contained in:
@@ -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;
|
||||
|
Reference in New Issue
Block a user