jcs
/textview
/amendments
/70
TVCalcLinesLocked: If no chunks have been allocated, we have no lines
jcs made amendment 70 about 1 month ago
--- tv_layout.c Wed Oct 14 16:46:23 2026
+++ tv_layout.c Wed Oct 14 17:03:19 2026
@@ -148,6 +148,11 @@ TVCalcLinesLocked(struct TVRec *tv, Boolean ignore_dir
register unsigned char c;
Boolean new_line;
+ if (tv->first_chunk == 0) {
+ tv->nlines = 0;
+ return true;
+ }
+
if (ignore_dirty)
chunk = TVGetChunk(tv, tv->first_chunk);
else {