We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent e31b7ce commit 1a4d725Copy full SHA for 1a4d725
src/Git/LineFilter.php
@@ -58,15 +58,16 @@ public function setFirstLineAlwaysTouched($firstLineAlwaysTouched)
58
*/
59
private function lineWasTouched(RelativeFile $file, $line)
60
{
61
- if ($line === 1 && $this->firstLineAlwaysTouched) {
62
- return true;
63
- }
64
-
65
$filePath = $file->getPath();
66
if (!key_exists($filePath, $this->modifiedFiles)) {
67
return false;
68
}
69
+ // File must have been touched to have the first line highlighted
+ if ($line === 1 && $this->firstLineAlwaysTouched) {
+ return true;
+ }
70
+
71
if ($this->branchModifications->isNewFile($file)) {
72
return true;
73
0 commit comments