--- a/mercurial/commands.py Sun Oct 19 19:12:07 2008 +0200
+++ b/mercurial/commands.py Thu Oct 23 14:56:16 2008 -0500
@@ -1094,9 +1094,9 @@
mstart, mend = match.span()
linenum += body.count('\n', begin, mstart) + 1
lstart = body.rfind('\n', begin, mstart) + 1 or begin
- lend = body.find('\n', mend)
+ begin = body.find('\n', mend) + 1 or len(body)
+ lend = begin - 1
yield linenum, mstart - lstart, mend - lstart, body[lstart:lend]
- begin = lend + 1
class linestate(object):
def __init__(self, line, linenum, colstart, colend):