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 #6870)
diff --git a/src/quickfix.c b/src/quickfix.c
index f8ff776..09d5d8f 100644
--- a/src/quickfix.c
+++ b/src/quickfix.c
@@ -810,7 +810,7 @@
// reached.
if (fgets((char *)IObuff, IOSIZE, state->fd) == NULL
|| (int)STRLEN(IObuff) < IOSIZE - 1
- || IObuff[IOSIZE - 1] == '\n')
+ || IObuff[IOSIZE - 2] == '\n')
break;
}