From 20f00fa6daefa154fd696bdbd61f818c1c2895ff Mon Sep 17 00:00:00 2001 From: Zheng Zhu Date: Thu, 25 Nov 2004 03:04:50 +0000 Subject: [PATCH] Really show the desired number of lines per hit. --- includes/SpecialSearch.php | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/includes/SpecialSearch.php b/includes/SpecialSearch.php index ad3600eb3c..a503e07b02 100644 --- a/includes/SpecialSearch.php +++ b/includes/SpecialSearch.php @@ -321,12 +321,11 @@ class SpecialSearch { if ( 0 == $contextlines ) { break; } - --$contextlines; ++$lineno; if ( ! preg_match( $pat1, $line, $m ) ) { continue; } - + --$contextlines; $pre = $wgContLang->truncate( $m[1], -$contextchars, '...' ); if ( count( $m ) < 3 ) { -- 2.20.1