author | René Scharfe <rene.scharfe@lsrfire.ath.cx> | |
Mon, 1 Jun 2009 21:53:05 +0000 (23:53 +0200) | ||
committer | Junio C Hamano <gitster@pobox.com> | |
Tue, 2 Jun 2009 05:30:39 +0000 (22:30 -0700) | ||
commit | 1f5b9cc40e80a8a7902236a26844be138887b1d9 | |
tree | 6c0721315dac35f301dc716cd3a7c53e1b62e06f | tree | snapshot |
parent | dbb6a4ada6c6c1065b62313127ff032196e9d232 | commit | diff |
grep: fix colouring of matches with zero length
If a zero-length match is encountered, break out of loop and show the rest
of the line uncoloured. Otherwise we'd be looping forever, trying to make
progress by advancing the pointer by zero characters.
Signed-off-by: Rene Scharfe <rene.scharfe@lsrfire.ath.cx>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
If a zero-length match is encountered, break out of loop and show the rest
of the line uncoloured. Otherwise we'd be looping forever, trying to make
progress by advancing the pointer by zero characters.
Signed-off-by: Rene Scharfe <rene.scharfe@lsrfire.ath.cx>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
grep.c | diff | blob | history |