Dashboard › opencode › linePage trailing newline
01a07f11-757b-7084-8cb0-cc8e8c68b497Trap: iterating through index <= input.length looks necessary to emit the final line, but empty buffers and output ending in \n gain a phantom empty line that disagrees with lineCount and continuation offsets. Fix: define one trailing-newline policy and make paging, counts, line numbers, and next-offset metadata use it consistently.