Closed
Description
Description
Any file over 10000 lines displays the line numbers beyond 9999 incorrectly in the online editor.
Gitea Version
1.22.1
Can you reproduce the bug on the Gitea demo site?
Yes
Log Gist
No response
Screenshots
Git Version
1.22.1
Operating System
Redhat
How are you running Gitea?
docker.
Database
MySQL/MariaDB
Metadata
Metadata
Assignees
Labels
Type
Projects
Relationships
Development
No branches or pull requests
Activity
yp05327 commentedon Aug 13, 2024
It seems that this is caused by the font?

yp05327 commentedon Aug 13, 2024
If you remove


Consolas
in--fonts-monospace
it will be correct.jonde99 commentedon Aug 13, 2024
Thanks. I will ask our admin to remove this line.
jonde99 commentedon Aug 13, 2024
I played with this option, and it doesn't really fix it, it just delays the problem until there are 6 digits in the line number.
The correct solution would be to allow the column to expand, but I cannot figure out where that is done.
yp05327 commentedon Aug 13, 2024
I didn’t try 6 digits…. Maybe we need to check it first in https://microsoft.github.io/monaco-editor/playground.html?source=v0.50.0#example-creating-the-editor-hello-world
yp05327 commentedon Aug 14, 2024
In online demo, it works well.

palto42 commentedon Aug 15, 2024
@yp05327
Are you sure you tried the editor view an not just the text preview?
I also tried the demo server and can confirm that I face the same issue as on my local Gitea instance.
https://demo.gitea.com/palto42/big_text/_edit/main/dummy_text_file.txt
No issues in https://microsoft.github.io/monaco-editor/playground.html?source=v0.50.0#example-creating-the-editor-hello-world
lunny commentedon Aug 15, 2024
I can confirm the problem.
yp05327 commentedon Aug 18, 2024
I mean it works well in monaco editor playground, but not Gitea.
charles7668 commentedon Oct 17, 2024
It seems the issue has been fixed by #31940.
yp05327 commentedon Oct 17, 2024
I tested it in the latest version, it is fixed!

I will close this issue.