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

Selecting methods in script editor methods list does not position them consistently when scrolling, if Word Wrap option is enabled. #70438

Closed
Torguen opened this issue Dec 22, 2022 · 13 comments · Fixed by #94002

Comments

@Torguen
Copy link

Torguen commented Dec 22, 2022

Godot version

v3.5.2.rc1.official [f5f0543]

System information

w10 64

Issue description

You can see it in the video.
I select a function and the editor places it at the bottom of the screen, other times it places it at the top, and other times it places it in the center.

https://youtu.be/4yqvRaNwZes

Steps to reproduce

Thanks to user Tetane we know that the problem happens when:
The setting "text_editor/appearance/word_wrap" is set to true.
See the video.

Minimal reproduction project

...

@akien-mga
Copy link
Member

I can't seem to reproduce the issue with 3.5.2.rc1 on Linux. For me it's consistently scrolling to have the selected function as the first line:
image

The only exception is when the functions are towards the end of the file, if scrolling past end of file is disabled.

Do you have any custom editor settings values set that could affect this?

@Torguen
Copy link
Author

Torguen commented Dec 22, 2022

I'm not sure I understand.
The editor misplaces the function even though there is plenty of room at the bottom of the script to position the function correctly in the center.

In the video I show this when I scroll down showing that there is enough space.

Can you give me more information about that option? I have to translate everything we write into my language and that makes it a bit difficult to understand.

@akien-mga
Copy link
Member

Yes I see the bug in your video, I'm just unable to reproduce it. So there must be a configuration difference between your Godot version and mine, or something in your script/project which triggers the bug.

What I'm suggesting is that your review your Editor Settings in the "Text Editor" category, to see if there's any setting that you configured to a value which is not the default one (so it shows with a revert arrow). One of these settings may cause the issue.

image

It could also be a general theme setting (font size, line spacing, etc.), or editor scale (mine is 100%, maybe you have a hidpi display with 150% or 200% scaling which is not properly handled for scrolling).

Alternatively, you could share your %APPDATA%/Godot/editor_settings-3.tres file to see if others can reproduce the issue with the same configuration.

@Torguen
Copy link
Author

Torguen commented Dec 22, 2022

Well, my configuration is this but I think that none of those options should be involved in the problem we are dealing with.

Captura1

I have tried to put the options as you show yours but it does not solve anything.

@akien-mga
Copy link
Member

I just showed one screen of potential options that could be related, but it's really everything which could impact this. If you can share your editor_settings-3.tres I can see if it triggers the issue for me.

@Torguen
Copy link
Author

Torguen commented Dec 22, 2022

Could it be something related to the script?

I can share the editor_settings file but won't I expose compromised information about android?, you know, the keys or passwords for debug, release, etc...

@Tetane
Copy link
Contributor

Tetane commented Dec 22, 2022

I was able to reproduce the issue in v3.5.1 by changing the setting "text_editor/appearance/word_wrap" to true.

@akien-mga
Copy link
Member

akien-mga commented Dec 22, 2022

I can share the editor_settings file but won't I expose compromised information about android?, you know, the keys or passwords for debug, release, etc...

The Android release key/password should be in the export_presets.cfg in theory, so it should be fine. The editor settings have the default debug user/password names, if yours are different from the default androiddebugkey and android you might want to remove them from the file. You can copy the file, open it in a text editor and remove lines which you don't want to share.

But this won't be needed, as @Tetane found which setting triggers the issue already :)

I was able to reproduce the issue in v3.5.1 by changing the setting "text_editor/appearance/word_wrap" to true.

I can confirm this. The diff between the top line and where the seeked function is shown matches the amount of lines wrapped (which introduce a new line without increasing the code line number).

@Torguen
Copy link
Author

Torguen commented Dec 22, 2022

I was able to reproduce the issue in v3.5.1 by changing the setting "text_editor/appearance/word_wrap" to true.

Yes, I have that option activated, so it could be due to the activation of that option.

@akien-mga akien-mga changed the title The editor does not place the function correctly centered. Selecting methods in script editor methods list does not position them consistently when scrolling, if Word Wrap option is enabled. Dec 22, 2022
@akien-mga
Copy link
Member

The issue also seems reproducible in latest 3.x and master.

@Torguen
Copy link
Author

Torguen commented Mar 7, 2023

Why did you label this as "enhancement"?
I consider this to be a problem (bug) because the script editor does not correctly position the function declaration as it does when you don't have the "word_wrap" option enabled.

I honestly don't think this is an enhancement, this needs a fix to a problem.

@Torguen
Copy link
Author

Torguen commented Mar 17, 2023

This is very annoying, it also happens when you switch between the script editor and the 2D editor, as you can see in this video.
v3.5.2.stable.official [170ba33]

2023-03-17.10-44-44.mp4

@Torguen
Copy link
Author

Torguen commented Aug 26, 2023

Still in 3.6 beta 3

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants