Skip to content

Code Editor Line number over 9999 not displayed correctly #31642

Closed
@jonde99

Description

@jonde99

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

Activity

added
issue/confirmedIssue has been reviewed and confirmed to be present or accepted to be implemented
on Aug 13, 2024
yp05327

yp05327 commented on Aug 13, 2024

@yp05327
Contributor

It seems that this is caused by the font?
image

yp05327

yp05327 commented on Aug 13, 2024

@yp05327
Contributor

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

jonde99

jonde99 commented on Aug 13, 2024

@jonde99
Author

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

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

jonde99

jonde99 commented on Aug 13, 2024

@jonde99
Author

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

yp05327 commented on Aug 13, 2024

@yp05327
Contributor
yp05327

yp05327 commented on Aug 14, 2024

@yp05327
Contributor

In online demo, it works well.
image

palto42

palto42 commented on Aug 15, 2024

@palto42

@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

lunny commented on Aug 15, 2024

@lunny
Member

I can confirm the problem.

图片

yp05327

yp05327 commented on Aug 18, 2024

@yp05327
Contributor

@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

charles7668 commented on Oct 17, 2024

@charles7668
Contributor

It seems the issue has been fixed by #31940.

yp05327

yp05327 commented on Oct 17, 2024

@yp05327
Contributor

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

I will close this issue.

added this to the 1.23.0 milestone on Oct 17, 2024
locked as resolved and limited conversation to collaborators on Jan 15, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    issue/confirmedIssue has been reviewed and confirmed to be present or accepted to be implementedtopic/uiChange the appearance of the Gitea UItype/bug

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

      Development

      No branches or pull requests

        Participants

        @lunny@techknowlogick@palto42@yp05327@jonde99

        Issue actions

          Code Editor Line number over 9999 not displayed correctly · Issue #31642 · go-gitea/gitea