Skip to content

Commit d4e38fc

Browse files
committed
fix calls to token highlight stuff
1 parent 823c013 commit d4e38fc

File tree

2 files changed

+4
-5
lines changed

2 files changed

+4
-5
lines changed

4coder_fleury_hooks.cpp

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -140,14 +140,16 @@ F4_RenderBuffer(Application_Links *app, View_ID view_id, Face_ID face_id,
140140
if (range_contains(token_range, view_get_cursor_pos(app, view_id)))
141141
{
142142
F4_RenderRangeHighlight(app, view_id, text_layout_id,
143-
token_range, F4_RangeHighlightKind_Underline);
143+
token_range, F4_RangeHighlightKind_Underline,
144+
fcolor_resolve(fcolor_id(fleury_color_token_highlight)));
144145
}
145146
// NOTE(jack): If the token matches the active buffer token. highlight it with a Minor Underline
146147
else if(active_cursor_token->kind == TokenBaseKind_Identifier &&
147148
string_match(token_string, active_cursor_string))
148149
{
149150
F4_RenderRangeHighlight(app, view_id, text_layout_id,
150-
token_range, F4_RangeHighlightKind_MinorUnderline);
151+
token_range, F4_RangeHighlightKind_MinorUnderline,
152+
fcolor_resolve(fcolor_id(fleury_color_token_minor_highlight)));
151153

152154
}
153155
}

4coder_fleury_render_helpers.cpp

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -28,8 +28,6 @@ F4_RenderRangeHighlight(Application_Links *app, View_ID view_id, Text_Layout_ID
2828
total_range_rect.x1 = MaximumF32(range_start_rect.x1, range_end_rect.x1);
2929
total_range_rect.y1 = MaximumF32(range_start_rect.y1, range_end_rect.y1);
3030

31-
ARGB_Color color = fcolor_resolve(fcolor_id(fleury_color_token_highlight));
32-
3331
switch (kind) {
3432
case F4_RangeHighlightKind_Underline: {
3533
total_range_rect.y0 = total_range_rect.y1 - 1.f;
@@ -39,7 +37,6 @@ F4_RenderRangeHighlight(Application_Links *app, View_ID view_id, Text_Layout_ID
3937
case F4_RangeHighlightKind_MinorUnderline: {
4038
total_range_rect.y0 = total_range_rect.y1 - 1.f;
4139
total_range_rect.y1 += 1.f;
42-
color = fcolor_resolve(fcolor_id(fleury_color_token_minor_highlight));
4340
}
4441
}
4542
draw_rectangle(app, total_range_rect, 4.f, color);

0 commit comments

Comments
 (0)