Fix underline drawing over line numbers

This commit is contained in:
Krzosa Karol
2026-02-04 08:26:32 +01:00
parent 7a73a982d2
commit 3ab6639afb

View File

@@ -103,6 +103,7 @@ void DrawUnderline(Window *window, View *view, Buffer *buffer, Range range, Colo
Vec2I max = {xy_max.col * window->font->char_spacing, (xy_max.line + 1) * window->font->line_spacing}; Vec2I max = {xy_max.col * window->font->char_spacing, (xy_max.line + 1) * window->font->line_spacing};
Rect2I rect = {min, max}; Rect2I rect = {min, max};
Rect2I scrolled_rect = rect - view->scroll + window->document_rect.min; Rect2I scrolled_rect = rect - view->scroll + window->document_rect.min;
if (scrolled_rect.min.x < window->document_rect.min.x) scrolled_rect.min.x = window->document_rect.min.x;
DrawRectOutline(scrolled_rect, color); DrawRectOutline(scrolled_rect, color);
} }