Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Code Editor Line number over 9999 not displayed correctly #31642

Closed
jonde99 opened this issue Jul 16, 2024 · 11 comments
Closed

Code Editor Line number over 9999 not displayed correctly #31642

jonde99 opened this issue Jul 16, 2024 · 11 comments
Labels
issue/confirmed Issue has been reviewed and confirmed to be present or accepted to be implemented topic/ui Change the appearance of the Gitea UI type/bug
Milestone

Comments

@jonde99
Copy link

jonde99 commented Jul 16, 2024

Description

image

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

Review mode:
image

Edit Mode:
image

Git Version

1.22.1

Operating System

Redhat

How are you running Gitea?

docker.

Database

MySQL/MariaDB

@techknowlogick techknowlogick added the topic/ui Change the appearance of the Gitea UI label Jul 16, 2024
@yp05327 yp05327 added the issue/confirmed Issue has been reviewed and confirmed to be present or accepted to be implemented label Aug 13, 2024
@yp05327
Copy link
Contributor

yp05327 commented Aug 13, 2024

It seems that this is caused by the font?
image

@yp05327
Copy link
Contributor

yp05327 commented Aug 13, 2024

If you remove Consolas in --fonts-monospace it will be correct.
image
image

@jonde99
Copy link
Author

jonde99 commented Aug 13, 2024

If you remove Consolas in --fonts-monospace it will be correct. image image

Thanks. I will ask our admin to remove this line.

@jonde99
Copy link
Author

jonde99 commented 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
Copy link
Contributor

yp05327 commented 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
Copy link
Contributor

yp05327 commented Aug 14, 2024

In online demo, it works well.
image

@palto42
Copy link

palto42 commented Aug 15, 2024

@yp05327

In online demo, it works well.

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

image

No issues in https://microsoft.github.io/monaco-editor/playground.html?source=v0.50.0#example-creating-the-editor-hello-world

image

@lunny
Copy link
Member

lunny commented Aug 15, 2024

I can confirm the problem.

图片

@yp05327
Copy link
Contributor

yp05327 commented Aug 18, 2024

@yp05327

In online demo, it works well.

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

I mean it works well in monaco editor playground, but not Gitea.

@charles7668
Copy link
Contributor

It seems the issue has been fixed by #31940.

@yp05327
Copy link
Contributor

yp05327 commented Oct 17, 2024

I tested it in the latest version, it is fixed!
image

I will close this issue.

@yp05327 yp05327 closed this as completed Oct 17, 2024
@lunny lunny added this to the 1.23.0 milestone Oct 17, 2024
@go-gitea go-gitea locked as resolved and limited conversation to collaborators Jan 15, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
issue/confirmed Issue has been reviewed and confirmed to be present or accepted to be implemented topic/ui Change the appearance of the Gitea UI type/bug
Projects
None yet
Development

No branches or pull requests

6 participants