vim-patch:8.2.1599: missing line end when skipping a long line with :cgetfile

Problem:    Missing line end when skipping a long line with :cgetfile.
Solution:   Fix off-by-one error. (closes vim/vim#6870)
59941cbd80
This commit is contained in:
Jan Edmund Lazo
2020-10-06 23:14:41 -04:00
parent 4a6e201e37
commit 670a577c6b
2 changed files with 19 additions and 1 deletions

View File

@@ -808,7 +808,7 @@ retry:
}
break;
}
if (STRLEN(IObuff) < IOSIZE - 1 || IObuff[IOSIZE - 1] == '\n') {
if (STRLEN(IObuff) < IOSIZE - 1 || IObuff[IOSIZE - 2] == '\n') {
break;
}
}