Skip to content

Difference in last line does not get handled #7

@Alien426

Description

@Alien426

Bug Description

See title.
getChangedLines() does return the correct line numbers.

Steps To Reproduce

Put a difference in the last line.

Expected Behavior

The change in the last line should be displayed when calling getDiff() or renderDiff().

Possible Solution

$captureLine only gets pushed onto $return when a line is equal. When the last line is reached and differs, the for loop is already ending and the capture buffer is not checked anymore.

Seems to work when putting a copy of the if ($captureBuffer !== []) block before the return.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions