mirror of
https://github.com/neovim/neovim.git
synced 2025-09-16 08:18:17 +00:00
vim-patch:7.4.568
Problem: Giving an error for ":0wincmd w" is a problem for some plugins. Solution: Allow the zero in the range. (Marcin Szamotulski) https://code.google.com/p/vim/source/detail?r=v7-4-568
This commit is contained in:
@@ -3574,11 +3574,11 @@ static char_u *invalid_range(exarg_T *eap)
|
||||
}
|
||||
|
||||
if (eap->argt & RANGE) {
|
||||
switch (eap->addr_type) {
|
||||
switch(eap->addr_type) {
|
||||
case ADDR_LINES:
|
||||
if (!(eap->argt & NOTADR) &&
|
||||
eap->line2 >
|
||||
curbuf->b_ml.ml_line_count + (eap->cmdidx == CMD_diffget)) {
|
||||
if (!(eap->argt & NOTADR)
|
||||
&& eap->line2 > curbuf->b_ml.ml_line_count
|
||||
+ (eap->cmdidx == CMD_diffget)) {
|
||||
return (char_u *)_(e_invrange);
|
||||
}
|
||||
break;
|
||||
@@ -3588,11 +3588,12 @@ static char_u *invalid_range(exarg_T *eap)
|
||||
}
|
||||
break;
|
||||
case ADDR_BUFFERS:
|
||||
if (eap->line1 < firstbuf->b_fnum || eap->line2 > lastbuf->b_fnum) {
|
||||
if (eap->line1 < firstbuf->b_fnum
|
||||
|| eap->line2 > lastbuf->b_fnum) {
|
||||
return (char_u *)_(e_invrange);
|
||||
}
|
||||
break;
|
||||
case ADDR_LOADED_BUFFERS:
|
||||
case ADDR_LOADED_BUFFERS:
|
||||
buf = firstbuf;
|
||||
while (buf->b_ml.ml_mfp == NULL) {
|
||||
if (buf->b_next == NULL) {
|
||||
|
Reference in New Issue
Block a user