Highlight error lines in minimap

This commit is contained in:
Mika Viskari 2023-11-16 19:36:23 +02:00
parent 56a2b143a2
commit 609eb8bc01
2 changed files with 9 additions and 2 deletions

View file

@ -770,7 +770,14 @@ void TextEdit::_notification(int p_what) {
Dictionary color_map = _get_line_syntax_highlighting(minimap_line);
Color line_background_color = text.get_line_background_color(minimap_line);
line_background_color.a *= 0.6;
if (line_background_color != theme_cache.background_color) {
// Make non-default background colors more visible, such as error markers.
line_background_color.a = 1.0;
} else {
line_background_color.a *= 0.6;
}
Color current_color = theme_cache.font_color;
if (!editable) {
current_color = theme_cache.font_readonly_color;

View file

@ -4118,7 +4118,7 @@ TEST_CASE("[SceneTree][TextEdit] setter getters") {
CHECK_FALSE(text_edit->is_drawing_spaces());
}
SUBCASE("[TextEdit] draw minimao") {
SUBCASE("[TextEdit] draw minimap") {
text_edit->set_draw_minimap(true);
CHECK(text_edit->is_drawing_minimap());
text_edit->set_draw_minimap(false);