mirror of
https://github.com/neovim/neovim.git
synced 2025-09-16 16:28: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) {
|
||||
|
@@ -21,8 +21,8 @@ LocalRangeLines 2 5
|
||||
4argu d
|
||||
1argu a
|
||||
100b E16: Invalid range
|
||||
0close E16: Invalid range
|
||||
$close 4
|
||||
0close
|
||||
$close 3
|
||||
$+close E16: Invalid range
|
||||
$tabe 2
|
||||
$+tabe E16: Invalid range
|
||||
|
@@ -211,7 +211,7 @@ static int included_patches[] = {
|
||||
//571 NA
|
||||
//570 NA
|
||||
//569,
|
||||
//568,
|
||||
568,
|
||||
567,
|
||||
566,
|
||||
565,
|
||||
|
Reference in New Issue
Block a user