Closed
Description
Description
When the last line of a file is deleted, the diff rendering incorrectly shows a code-expander-button
below that last line, and clicking it incorrectly expands the first lines of the file after that last line.
https://try.gitea.io/silverwind/symlink-test/commit/96ab2118ae7afd916791a00531016d99e11c2009
Incorrectly displayed button:

Incorrect expansion after click:

Works fine if the last line is an addition:
https://try.gitea.io/silverwind/symlink-test/commit/24fb688b579af3c75e0d5cefe1ec4bf721585823

Gitea Version
main
Can you reproduce the bug on the Gitea demo site?
Yes