comparison files.c @ 175:ffdb0b73856f

Suppress blank lines later. Fixes the rest of the bizarre spacing behavior described in changeset 82cc6fa54b01. Expand t39 to cover more cases, too.
author David A. Holland
date Fri, 12 Jun 2015 02:38:04 -0400
parents f14f5352956c
children 4c3375895c6e
comparison
equal deleted inserted replaced
174:09cfad6772de 175:ffdb0b73856f
272 assert(buf[lineend] == '\0'); 272 assert(buf[lineend] == '\0');
273 273
274 /* count how many commented-out newlines we swallowed */ 274 /* count how many commented-out newlines we swallowed */
275 places.nextline.line += countnls(buf, linestart, lineend); 275 places.nextline.line += countnls(buf, linestart, lineend);
276 276
277 /* if the line isn't empty, process it */ 277 /* process the line (even if it's empty) */
278 if (lineend > linestart) { 278 directive_gotline(&places, buf+linestart, lineend-linestart);
279 directive_gotline(&places,
280 buf+linestart, lineend-linestart);
281 }
282 279
283 linestart = nextlinestart; 280 linestart = nextlinestart;
284 lineend = findeol(buf, linestart, bufend); 281 lineend = findeol(buf, linestart, bufend);
285 places.current = places.nextline; 282 places.current = places.nextline;
286 } 283 }