[Bug] indent in "source view / edit file" #10752

Open
opened 2025-11-02 09:17:19 -06:00 by GiteaMirror · 4 comments
Owner

Originally created by @TimerWolf on GitHub (Apr 30, 2023).

Description

I do not know for sure what this is called indent?, but if you have used "tab" and not "space" between the lines in the source code you only see the different in "source view" and not when you "edit" the file and i think it would be nice if you could see it in both to easier identify it.

Gitea Version

1.19.2

Can you reproduce the bug on the Gitea demo site?

Yes

Log Gist

No response

Screenshots

Gitea

Git Version

1.19.2

Operating System

Linux

How are you running Gitea?

This time it was with "gitea-1.19.2-linux-amd64"

Database

MySQL

Originally created by @TimerWolf on GitHub (Apr 30, 2023). ### Description I do not know for sure what this is called indent?, but if you have used "tab" and not "space" between the lines in the source code you only see the different in "source view" and not when you "edit" the file and i think it would be nice if you could see it in both to easier identify it. ### Gitea Version 1.19.2 ### Can you reproduce the bug on the Gitea demo site? Yes ### Log Gist _No response_ ### Screenshots ![Gitea](https://i.imgur.com/62jyVGS.jpg) ### Git Version 1.19.2 ### Operating System Linux ### How are you running Gitea? This time it was with "[gitea-1.19.2-linux-amd64](https://github.com/go-gitea/gitea/releases/download/v1.19.2/gitea-1.19.2-linux-amd64)" ### Database MySQL
GiteaMirror added the type/bug label 2025-11-02 09:17:19 -06:00
Author
Owner

@silverwind commented on GitHub (Apr 30, 2023):

You mean make tabs vs. spaces visible in the editor? I think we could enable this option:

https://microsoft.github.io/monaco-editor/docs.html#interfaces/editor.IEditorOptions.html#renderWhitespace

We can set it to the selection option, so whitespace characters will be visible during selection only, which is the default in VSCode as well.

@silverwind commented on GitHub (Apr 30, 2023): You mean make tabs vs. spaces visible in the editor? I think we could enable this option: https://microsoft.github.io/monaco-editor/docs.html#interfaces/editor.IEditorOptions.html#renderWhitespace We can set it to the `selection` option, so whitespace characters will be visible during selection only, which is the default in VSCode as well.
Author
Owner

@silverwind commented on GitHub (Apr 30, 2023):

https://github.com/go-gitea/gitea/pull/24444 will fix it.

@silverwind commented on GitHub (Apr 30, 2023): https://github.com/go-gitea/gitea/pull/24444 will fix it.
Author
Owner

@TimerWolf commented on GitHub (Apr 30, 2023):

Not sure we talk about the same thing, when you "edit" the file the editor do not show the tab has been used instead of whitespace for unknown reason...

But in the source view it's a lot more clear that just that one line uses tab and instead of whitespace and breaks the coding style...

The reason why i took this up was that i think it stupid to hide it as it will be a lot more harder to detect if it is hidden....

A switch maybe to change the way it shows the source in the editor?

@TimerWolf commented on GitHub (Apr 30, 2023): Not sure we talk about the same thing, when you "edit" the file the editor do not show the tab has been used instead of whitespace for unknown reason... But in the source view it's a lot more clear that just that one line uses tab and instead of whitespace and breaks the coding style... The reason why i took this up was that i think it stupid to hide it as it will be a lot more harder to detect if it is hidden.... A switch maybe to change the way it shows the source in the editor?
Author
Owner

@silverwind commented on GitHub (Apr 30, 2023):

You mean the width of the tab being different in both view (4 in one, 8 in another)? Yes, that is something we're planning to fix as well. See https://github.com/go-gitea/gitea/issues/9071 for some discussion.

@silverwind commented on GitHub (Apr 30, 2023): You mean the width of the tab being different in both view (4 in one, 8 in another)? Yes, that is something we're planning to fix as well. See https://github.com/go-gitea/gitea/issues/9071 for some discussion.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/gitea#10752