Page MenuHomePhabricator

Paste line counts incorrect if content is more than 1024 characters
Closed, ResolvedPublic

Description

Reproduction Steps:

  • Create a rather long paste with more than 1024 characters in content (E.g., P2027)

Expected Result:

  • The snippet displays the actual paste line count (96 Lines)

Observed Result:

  • The snippet displays the line count at which it was truncated (49 Lines)
    pasted_file (153×878 px, 24 KB)

This reproduces on rPc8f5fb120573 and is the result of my own bad code in D17256. I should have gotten the line count before the snippet was truncated. I'll submit a diff to fix this in a minute...