Skip to content

Commit

Permalink
Merge pull request #85054 from miv391/highlight-minimap-error-lines
Browse files Browse the repository at this point in the history
Highlight error lines in minimap
  • Loading branch information
YuriSizov committed Dec 8, 2023
2 parents aec890b + 609eb8b commit 6269341
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 2 deletions.
9 changes: 8 additions & 1 deletion scene/gui/text_edit.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
2 changes: 1 addition & 1 deletion tests/scene/test_text_edit.h
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit 6269341

Please sign in to comment.