author | René Scharfe <rene.scharfe@lsrfire.ath.cx> | |
Wed, 20 May 2009 21:31:53 +0000 (23:31 +0200) | ||
committer | Junio C Hamano <gitster@pobox.com> | |
Thu, 21 May 2009 01:49:20 +0000 (18:49 -0700) | ||
commit | e701fadb9e0e51a6811690d95a53bd1f5b6fad86 | |
tree | 3d4c63375750ebf07fdbdfa95439a1f94a93c596 | tree | snapshot |
parent | 8dfb17e1fd7dec1d3a1978eb46743964c481cd08 | commit | diff |
grep: fix word-regexp colouring
As noticed by Dmitry Gryazin: When a pattern is found but it doesn't
start and end at word boundaries, bol is forwarded to after the match and
the pattern is searched again. When a pattern is finally found between
word boundaries, the match offsets are off by the number of characters
that have been skipped.
This patch corrects the offsets to be relative to the value of bol as
passed to match_one_pattern() by its caller.
Signed-off-by: Rene Scharfe <rene.scharfe@lsrfire.ath.cx>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
As noticed by Dmitry Gryazin: When a pattern is found but it doesn't
start and end at word boundaries, bol is forwarded to after the match and
the pattern is searched again. When a pattern is finally found between
word boundaries, the match offsets are off by the number of characters
that have been skipped.
This patch corrects the offsets to be relative to the value of bol as
passed to match_one_pattern() by its caller.
Signed-off-by: Rene Scharfe <rene.scharfe@lsrfire.ath.cx>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
grep.c | diff | blob | history |