Skip to content

Commit 604a79a

Browse files
author
alexandresalome
committed
[TwigBundle] Fix line start in twig:lint command
1 parent 91936b5 commit 604a79a

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/Symfony/Bundle/TwigBundle/Command/LintCommand.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -121,7 +121,7 @@ protected function getContext($file, $line, $context = 3)
121121
$fileContent = file_get_contents($file);
122122
$lines = explode("\n", $fileContent);
123123

124-
$position = min(0, $line - $context);
124+
$position = max(0, $line - $context);
125125
$max = min(count($lines), $line - 1 + $context);
126126

127127
$result = array();

0 commit comments

Comments
 (0)