Something I hadn't thought to test before was how $cb(0) counted lines vs how $lines(file) counted them. It looks like the fix now makes the clipboard and diskfile lines always be matching numbers.

Code:
//clipboard $cr $+ 1 $+ $lf $+ 2 $+ $crlf $+ 3 $+ $cr $+ $crlf $+ 4 $+ $crlf $+ $lf $+ 5 $+ $lf $+ $cr $+ 6 $+ $cr $+ 7 | noop $regsubex(foo,$cb,,,&var) | bwrite -c test.dat 0 -1 &var | var %i $lines(test.dat) | echo -a cb(0) $cb(0) vs lines(test.dat) %i | while (%i) { noop $cb(%i,,&v2) | echo -a %i : $bvar(&v2,1-) : $bvar(&v2,1-).text vs $read(test.dat,nt,%i) | dec %i }



Prior to this change, 7.52-nobeta thought $cb(0) was 7 and $lines(test.dat) was 11, but now they both think there are 11 lines. Somewhere between 7.52 and 6.35 $lines began counting disk lines differently, as 6.35 thinks both the clipboard and diskfile had 7 lines.

It looks like every $cr and $lf are now counted as another line ending, except for the $cr immediately preceding the $lf causing it to be handled as part of $crlf. [end-of-file] is also counted as an additional line-ending if the file doesn't end with a $cr or $lf. Even a backwards $lfcr is counted as 2 lines.