godotengine / godot

Godot Engine – Multi-platform 2D and 3D game engine
https://godotengine.org
MIT License
86.37k stars 19.24k forks source link

Caret can disappear from script editor #92821

Open KoBeWi opened 4 weeks ago

KoBeWi commented 4 weeks ago

Tested versions

4.3 beta1

System information

Windows 10.0.19045 - Vulkan (Forward+) - dedicated NVIDIA GeForce GTX 1060 (NVIDIA; 31.0.15.4633) - Intel(R) Core(TM) i7-7700HQ CPU @ 2.80GHz (8 Threads)

Issue description

Might be related to #90569

https://github.com/godotengine/godot/assets/2223172/599a67a5-f82f-495c-be0c-4376a9fe1173

Seems to happen randomly. Also it's specific to the affected CodeEdit, as other scripts don't have the issue:

https://github.com/godotengine/godot/assets/2223172/da55b249-6b6e-438b-bf5b-5383995f4c69

Steps to reproduce

  1. 🤷‍♂️
  2. Caret is not visible

Minimal reproduction project (MRP)

N/A

Calinou commented 4 weeks ago

If you disable caret blink in the script editor (either in the editor settings or by hacking around the editor source), does this still occur?

KoBeWi commented 4 weeks ago

Yes.

jinyangcruise commented 4 weeks ago

Same problem happens if text field in a standalone sub Window and in 4.3.dev6. But not happen in 4.3.beta1. This is a MRP for this situation.

test_caret_blink_in_window.zip

Maybe it's not the same situation with KoBeWi's. But maybe related.

Infini-Creation commented 4 weeks ago

Got the same issue for a while (maybe from 4.3-dev5 release or a previous version), sometimes when renaming scene or script or even a directory, no caret at all. Pretty annoying.

Calinou commented 3 weeks ago

Same problem happens if text field in a standalone sub Window and in 4.3.dev6. But not happen in 4.3.beta1. This is a MRP for this situation.

This may be due to an intentional check in the code that hides the caret for unfocused windows (like many operating systems tend to do on their native windows).

KoBeWi commented 12 hours ago

I think this might be related to #92634