godot
godot copied to clipboard
TextEdit cursor option for "caret_background_color" fails to activate
Tested versions
v4.2.1.stable.official [b09f793f5]
System information
Godot v4.2.1.stable - macOS 14.2.0 - Vulkan (Forward+) - integrated Apple M1 - Apple M1 (8 Threads)
Issue description
The setting for the caret fails to render. Mentioned here: https://github.com/godotengine/godot-proposals/issues/8473#issuecomment-1845930636
Steps to reproduce
In Editor Settings, find the background color setting for the caret. Change it to whatever, but it will have no effect.
Minimal reproduction project (MRP)
Godot IDE
Indeed, unlike caret_color, the caret_background_color is never used in text_edit.cpp
In the linked issue @Paulb23 said:
caret_background_colorshould be the colour of the text behind the caret when block caret is enabled, but currently there's a bug where it's not actually used anywhere.
I assume "block caret" is when you hit the Ins key on your keyboard and the caret switches to something that underlines a letter at a time.
Can I confirm that this setting is meant to change the colour of the text character that the cursor and not the background of the selected letter?
To put it another way, Option 1 or 2?
I assume "block caret" is when you hit the Ins key on your keyboard and the caret switches to something that underlines a letter at a time.
I was not able to test this since Macs don't use Insert key (there are ways to add it but it's not a 1:1 mapping as on Windows. Related discussion link). But I don't think it's relevant here.
Can I confirm that this setting is meant to change the colour of the text character that the cursor and not the background of the selected letter? To put it another way, Option 1 or 2?
The name of the option is "Caret background color", so it looks like option 2.
The name of the option is "Caret background color", so it looks like option 2.
You see, that's exactly what I was thinking, it makes sense.
But check the documentation: https://docs.godotengine.org/en/stable/classes/class_textedit.html#class-textedit-theme-color-caret-background-color
Color of the text behind the caret when using a block caret.
This seems to imply Option 1.
Meanwhile within the editor.
The script editor's caret background color. seems to imply Option 2.
I don't know who's decisions it is, but I would appreciate if it could be officially clarified which Option to go for.